hexsha
stringlengths
40
40
size
int64
3
1.03M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
3
972
max_stars_repo_name
stringlengths
6
130
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
972
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
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
972
max_forks_repo_name
stringlengths
6
130
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
3
1.03M
avg_line_length
float64
1.13
941k
max_line_length
int64
2
941k
alphanum_fraction
float64
0
1
9e809160ff527af8f64ac269208db1f8e13aaab0
527
py
Python
src/accounts/Views/LogoutView.py
samrika25/TRAVIS_HEROKU_GIT
bcae6d0422d9a0369810944a91dd03db7df0d058
[ "MIT" ]
null
null
null
src/accounts/Views/LogoutView.py
samrika25/TRAVIS_HEROKU_GIT
bcae6d0422d9a0369810944a91dd03db7df0d058
[ "MIT" ]
4
2021-03-30T12:35:36.000Z
2021-06-10T18:11:24.000Z
src/accounts/Views/LogoutView.py
samrika25/TRAVIS_HEROKU_GIT
bcae6d0422d9a0369810944a91dd03db7df0d058
[ "MIT" ]
2
2021-02-07T16:16:36.000Z
2021-07-13T05:26:51.000Z
from django.views import View from django.template import loader from django.contrib import messages from utils.request import generate_url_for from django.contrib.auth.models import User from utils.koora import get_message_or_default from django.contrib.auth import logout from django.http import HttpResponseRedirect ...
26.35
72
0.762808
663a2e723fa33ed495f3e42f31bf90cde7959a12
417
py
Python
009BubbleSort/bubbleSort.py
GitProfAn/100DaysOfAlgo
966b2b45e46ddcace4d7e374eb0ab9a03f1787c0
[ "MIT" ]
null
null
null
009BubbleSort/bubbleSort.py
GitProfAn/100DaysOfAlgo
966b2b45e46ddcace4d7e374eb0ab9a03f1787c0
[ "MIT" ]
null
null
null
009BubbleSort/bubbleSort.py
GitProfAn/100DaysOfAlgo
966b2b45e46ddcace4d7e374eb0ab9a03f1787c0
[ "MIT" ]
1
2021-05-15T19:42:15.000Z
2021-05-15T19:42:15.000Z
# Solution 1 # O(n^2) time / O(1) space def bubbleSort(array): isSorted = False counter = 0 while not isSorted: isSorted = True for i in range(len(array) - 1 - counter): if array[1] > array[i + 1]: swap(i, i + 1, array) isSorted = False co...
21.947368
49
0.513189
5db60b5a2fd62ce52067f8c30d53aea279e86d91
343
py
Python
challenges/queue-with-stacks/node.py
tyler-fishbone/data-structures-and-algorithms
29790f2672d3ddb0aadf62725f28180b092f4568
[ "MIT" ]
null
null
null
challenges/queue-with-stacks/node.py
tyler-fishbone/data-structures-and-algorithms
29790f2672d3ddb0aadf62725f28180b092f4568
[ "MIT" ]
4
2018-03-22T19:19:11.000Z
2018-04-11T00:35:26.000Z
data_structures/stack-dir/node.py
tyler-fishbone/data-structures-and-algorithms
29790f2672d3ddb0aadf62725f28180b092f4568
[ "MIT" ]
null
null
null
class Node: """ Creating nodes for use in data structures """ def __init__(self, val, next = None): """ method called upon creation of node """ self.val = val self._next = next def __repr__(self): """ string representation of node """ ...
21.4375
45
0.516035
8177268986cbc2ed06a619600f27e1f0aebd63a9
21,858
py
Python
models.py
jhvanstaalduinen/gnn-model-explainer
e0b1f01fc7f058a0ad1e4a1fb05f6686451a195c
[ "Apache-2.0" ]
null
null
null
models.py
jhvanstaalduinen/gnn-model-explainer
e0b1f01fc7f058a0ad1e4a1fb05f6686451a195c
[ "Apache-2.0" ]
null
null
null
models.py
jhvanstaalduinen/gnn-model-explainer
e0b1f01fc7f058a0ad1e4a1fb05f6686451a195c
[ "Apache-2.0" ]
null
null
null
import torch import torch.nn as nn from torch.nn import init import torch.nn.functional as F import numpy as np # GCN basic operation class GraphConv(nn.Module): def __init__( self, input_dim, output_dim, add_self=False, normalize_embedding=False, dro...
35.141479
121
0.537606
e6e600791cb3fde8b92f77d457895266d713fb24
9,920
py
Python
networkx/algorithms/operators/binary.py
jni/networkx
d15361da366b77573777a1542741387c29f34717
[ "BSD-3-Clause" ]
null
null
null
networkx/algorithms/operators/binary.py
jni/networkx
d15361da366b77573777a1542741387c29f34717
[ "BSD-3-Clause" ]
null
null
null
networkx/algorithms/operators/binary.py
jni/networkx
d15361da366b77573777a1542741387c29f34717
[ "BSD-3-Clause" ]
1
2019-10-23T22:57:51.000Z
2019-10-23T22:57:51.000Z
""" Operations on graphs including union, intersection, difference. """ # Copyright (C) 2004-2013 by # Aric Hagberg <hagberg@lanl.gov> # Dan Schult <dschult@colgate.edu> # Pieter Swart <swart@lanl.gov> # All rights reserved. # BSD license. import networkx as nx from networkx.utils import is_string_lik...
29.090909
79
0.604335
57041c6969ba0aa3d0294bbb877f636c18b3618a
3,880
py
Python
asent/data_classes.py
HLasse/asent
8045025c67dc8fcca1697d4e7b009695ae8fe599
[ "MIT" ]
null
null
null
asent/data_classes.py
HLasse/asent
8045025c67dc8fcca1697d4e7b009695ae8fe599
[ "MIT" ]
null
null
null
asent/data_classes.py
HLasse/asent
8045025c67dc8fcca1697d4e7b009695ae8fe599
[ "MIT" ]
null
null
null
from __future__ import annotations from typing import List, Union from pydantic import BaseModel from spacy.tokens import Span, Token, Doc class TokenPolarityOutput(BaseModel): """A data class for the polarity output of a span, notably allows for plotting the output""" class Config: arbitrary_types_...
31.04
96
0.60232
863d5590e15dc34971ce865750bd465c3a6e5cae
5,291
py
Python
lib/models/tcmr.py
Bob130/TCMR_RELEASE
c37c569ecfc26fd9320b6bf32d84d38f55cd69d4
[ "MIT" ]
167
2021-04-26T03:11:59.000Z
2022-03-30T02:46:17.000Z
lib/models/tcmr.py
Bob130/TCMR_RELEASE
c37c569ecfc26fd9320b6bf32d84d38f55cd69d4
[ "MIT" ]
23
2021-06-09T07:59:09.000Z
2022-03-24T13:52:07.000Z
lib/models/tcmr.py
Bob130/TCMR_RELEASE
c37c569ecfc26fd9320b6bf32d84d38f55cd69d4
[ "MIT" ]
23
2021-04-26T03:28:04.000Z
2022-03-04T13:02:25.000Z
import os import torch import os.path as osp import torch.nn as nn import torch.nn.functional as F from lib.core.config import BASE_DATA_DIR from lib.models.spin import Regressor class TemporalAttention(nn.Module): def __init__(self, attention_size, seq_len, non_linearity='tanh'): super(TemporalAttention...
31.123529
96
0.553015
24d6cd7888fa08291b21146868324b16ae71135a
510
py
Python
src/utils/strings.py
jbrezmorf/codecritic
190df65f2f12667469b55abed48a45de5dc18965
[ "MIT" ]
null
null
null
src/utils/strings.py
jbrezmorf/codecritic
190df65f2f12667469b55abed48a45de5dc18965
[ "MIT" ]
20
2019-05-26T12:13:19.000Z
2020-09-09T16:37:09.000Z
src/utils/strings.py
jbrezmorf/codecritic
190df65f2f12667469b55abed48a45de5dc18965
[ "MIT" ]
1
2020-04-13T09:02:48.000Z
2020-04-13T09:02:48.000Z
#!/bin/python3 # author: Jan Hybs import random import string import typing import hashlib def random_string(l): return ''.join(random.choice(string.ascii_uppercase + string.digits) for _ in range(l)) def ensure_iterable(it) -> typing.List[typing.Any]: if it is None: return [] if isinstance(i...
17
91
0.64902
14a0be3f4ee8193235c171ebcbf1c40ee3bb8367
26,375
py
Python
src/waldur_core/structure/admin.py
ahti87/waldur-mastermind
772268e62dfd8eadb387b2ec3789785817a6e621
[ "MIT" ]
2
2018-08-16T14:42:24.000Z
2019-07-20T03:36:59.000Z
src/waldur_core/structure/admin.py
ahti87/waldur-mastermind
772268e62dfd8eadb387b2ec3789785817a6e621
[ "MIT" ]
null
null
null
src/waldur_core/structure/admin.py
ahti87/waldur-mastermind
772268e62dfd8eadb387b2ec3789785817a6e621
[ "MIT" ]
3
2019-02-27T19:17:49.000Z
2019-07-25T21:40:01.000Z
import collections import itertools import json import logging from functools import lru_cache from django import forms from django.conf import settings from django.contrib import admin, messages from django.contrib.admin import SimpleListFilter from django.core.exceptions import FieldDoesNotExist, ValidationError fro...
34.342448
102
0.641137
2635149fae474141abe53438cddf6976f134ea57
356
py
Python
BigBuyPy/utils.py
devandrepascoa/BigBuyPy
d69277cdf4cadc9922205600c63a2de0700c221d
[ "MIT" ]
null
null
null
BigBuyPy/utils.py
devandrepascoa/BigBuyPy
d69277cdf4cadc9922205600c63a2de0700c221d
[ "MIT" ]
null
null
null
BigBuyPy/utils.py
devandrepascoa/BigBuyPy
d69277cdf4cadc9922205600c63a2de0700c221d
[ "MIT" ]
null
null
null
import requests def createFunction(*args, **kwargs): def function_template(*args, **kwargs): response = requests.get( self.chosen_endpoint + "/rest/catalog/products", params={"_format": "json"}, headers={"Authorization": self.api_key}, ) return response.j...
27.384615
60
0.609551
7fb1fb2153e6a084ca6ba4789d2b26be1025d2b7
18,150
py
Python
skimage/filters/edges.py
JeanKossaifi/scikit-image
dea355288db8bd3340353f2be6969f72dbc7dc7e
[ "BSD-3-Clause" ]
1
2019-09-08T15:01:42.000Z
2019-09-08T15:01:42.000Z
skimage/filters/edges.py
JeanKossaifi/scikit-image
dea355288db8bd3340353f2be6969f72dbc7dc7e
[ "BSD-3-Clause" ]
null
null
null
skimage/filters/edges.py
JeanKossaifi/scikit-image
dea355288db8bd3340353f2be6969f72dbc7dc7e
[ "BSD-3-Clause" ]
1
2021-09-28T18:22:50.000Z
2021-09-28T18:22:50.000Z
""" Sobel and Prewitt filters originally part of CellProfiler, code licensed under both GPL and BSD licenses. Website: http://www.cellprofiler.org Copyright (c) 2003-2009 Massachusetts Institute of Technology Copyright (c) 2009-2011 Broad Institute All rights reserved. Original author: Lee Kamentsky """ import numpy ...
25.708215
78
0.619394
c9360434a492c86da9fec0b5007c995df843fcaa
16,251
py
Python
tests/test_ggg.py
kstoreyf/TreeCorr
f81b4b762c8672b9047ed045c300730cc2983eb0
[ "Python-2.0", "OLDAP-2.7" ]
null
null
null
tests/test_ggg.py
kstoreyf/TreeCorr
f81b4b762c8672b9047ed045c300730cc2983eb0
[ "Python-2.0", "OLDAP-2.7" ]
null
null
null
tests/test_ggg.py
kstoreyf/TreeCorr
f81b4b762c8672b9047ed045c300730cc2983eb0
[ "Python-2.0", "OLDAP-2.7" ]
null
null
null
# Copyright (c) 2003-2015 by Mike Jarvis # # TreeCorr is free software: redistribution and use in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, this # list of condi...
52.254019
143
0.614978
cfc0d9910c8c1c9e90763020c05701dc47ff696a
157
py
Python
mpm/main.py
anapaulagomes/coletores
5ed94120b23465586f34a924aa8f5b3e34565b86
[ "MIT" ]
null
null
null
mpm/main.py
anapaulagomes/coletores
5ed94120b23465586f34a924aa8f5b3e34565b86
[ "MIT" ]
null
null
null
mpm/main.py
anapaulagomes/coletores
5ed94120b23465586f34a924aa8f5b3e34565b86
[ "MIT" ]
null
null
null
import sys import crawler # Main execution def main(): month = sys.argv[1] year = sys.argv[2] file_names = crawler.crawl(year,month) main()
13.083333
44
0.649682
d170fc8563b28d2141af51dbd83da605946c81a7
4,278
py
Python
main_fed.py
lxm-n/p2p-LDNC
ff4cbdae42258e23fb5c25fd7d67e1430dafee37
[ "MIT" ]
697
2018-10-29T06:08:36.000Z
2022-03-31T03:34:24.000Z
main_fed.py
lxm-n/p2p-LDNC
ff4cbdae42258e23fb5c25fd7d67e1430dafee37
[ "MIT" ]
21
2018-06-21T11:43:58.000Z
2022-01-06T08:29:54.000Z
main_fed.py
lxm-n/p2p-LDNC
ff4cbdae42258e23fb5c25fd7d67e1430dafee37
[ "MIT" ]
241
2018-04-26T14:37:16.000Z
2022-03-26T02:32:17.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # Python version: 3.6 import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import copy import numpy as np from torchvision import datasets, transforms import torch from utils.sampling import mnist_iid, mnist_noniid, cifar_iid from utils.options import a...
37.2
121
0.647733
3d69238b2eb47c9432443a0cc4c6f54a2529e211
404
py
Python
http_quest/passwords.py
2tunnels/http-quest
cc8686d1bef9e711ab43ece98831cc9396d4d886
[ "MIT" ]
1
2020-06-16T18:24:37.000Z
2020-06-16T18:24:37.000Z
http_quest/passwords.py
2tunnels/http-quest
cc8686d1bef9e711ab43ece98831cc9396d4d886
[ "MIT" ]
5
2020-06-15T21:21:09.000Z
2020-06-17T21:54:16.000Z
http_quest/passwords.py
2tunnels/http-quest
cc8686d1bef9e711ab43ece98831cc9396d4d886
[ "MIT" ]
null
null
null
PLAIN = "8NhWsgbWTg4mPtSJfVJq" REVERSE = "seP7fsDziycSw9z6Q37J" BASE64 = "e8dTLGBjD24B4gtvh8Yw" HEADERS = "DH9sx5rS2aULxsqAcRVo" DELETE = "n7YmxDxMh98ofkXpSRFF" USER_AGENT = "vg7pqnW6GW8xMAhxiJsY" ACCEPT_LANGUAGE = "meTomb7yqcYU7cT7j8bi" REDIRECT = "PWjtmAsfd8UMb3m7dVa2" ROBOTS = "rR5L65SG9RAx4ko3UK4u" GUESS_NUMBER = "...
31.076923
40
0.821782
4a82dd00f96bd199d749903e46d092977932eca0
38,510
py
Python
dog_app.py
pwallrich/custom-dog-project
dd8b8f1879969e04845e1400ef9b2202de3d7c49
[ "MIT" ]
null
null
null
dog_app.py
pwallrich/custom-dog-project
dd8b8f1879969e04845e1400ef9b2202de3d7c49
[ "MIT" ]
null
null
null
dog_app.py
pwallrich/custom-dog-project
dd8b8f1879969e04845e1400ef9b2202de3d7c49
[ "MIT" ]
null
null
null
# coding: utf-8 # # Artificial Intelligence Nanodegree # # ## Convolutional Neural Networks # # ## Project: Write an Algorithm for a Dog Identification App # # --- # # In this notebook, some template code has already been provided for you, and you will need to implement additional functionality to successfully c...
46.622276
1,036
0.747364
eb8893e02083377e87065921eefd879196a9ed04
3,008
py
Python
pymem/pattern.py
StarrFox/Pymem
1d1b1095c097333941c01ef96125dd6f3b7f22a7
[ "MIT" ]
null
null
null
pymem/pattern.py
StarrFox/Pymem
1d1b1095c097333941c01ef96125dd6f3b7f22a7
[ "MIT" ]
null
null
null
pymem/pattern.py
StarrFox/Pymem
1d1b1095c097333941c01ef96125dd6f3b7f22a7
[ "MIT" ]
null
null
null
import re import pymem.memory import pymem.ressources.kernel32 import pymem.ressources.structure def scan_pattern_page(handle, address, pattern): """Search a byte pattern given a memory location. Will query memory location information and search over until it reaches the length of the memory page. If not...
32
119
0.682846
e44ea722a6f588316071b349e03395b76273dda5
4,180
py
Python
src/gdphelper/gdpdescribe.py
flor14/gdphelper
bfcd70709097b22aa51d01b2f967ddc5947e3ab6
[ "MIT" ]
null
null
null
src/gdphelper/gdpdescribe.py
flor14/gdphelper
bfcd70709097b22aa51d01b2f967ddc5947e3ab6
[ "MIT" ]
null
null
null
src/gdphelper/gdpdescribe.py
flor14/gdphelper
bfcd70709097b22aa51d01b2f967ddc5947e3ab6
[ "MIT" ]
null
null
null
import pandas as pd import numpy as np def gdpdescribe(df, x, y, stats=["mean", "sd", "median"], dec=2): """ Calculates summary statistics for the Numeric Variable x grouping by categorical variable y. The function is able to calculate the following descriptive statistics: Mean Me...
29.43662
135
0.573684
0de3e85165ec1bbc7e2f5d3a7fba60e1da8584c1
3,124
py
Python
azure/multiapi/storagev2/filedatalake/v2019_12_12/_serialize.py
xolve/azure-multiapi-storage-python
47509479427c879f18c554e451e838453d47c2bd
[ "MIT" ]
3
2019-02-21T20:46:26.000Z
2021-06-22T15:35:52.000Z
azure/multiapi/storagev2/filedatalake/v2019_12_12/_serialize.py
xolve/azure-multiapi-storage-python
47509479427c879f18c554e451e838453d47c2bd
[ "MIT" ]
11
2017-10-05T18:20:40.000Z
2020-10-10T09:20:19.000Z
azure/multiapi/storagev2/filedatalake/v2019_12_12/_serialize.py
xolve/azure-multiapi-storage-python
47509479427c879f18c554e451e838453d47c2bd
[ "MIT" ]
15
2017-10-02T18:48:20.000Z
2022-03-03T14:03:49.000Z
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- from azure...
38.097561
119
0.695903
89c6ab7304233ffa0839f9427a074b48ba7694da
13,088
py
Python
bridges/bridges.py
krs-world/bridges-python
2d3a22d637fd75a897cc9f6b2619eeebad5942bb
[ "MIT" ]
null
null
null
bridges/bridges.py
krs-world/bridges-python
2d3a22d637fd75a897cc9f6b2619eeebad5942bb
[ "MIT" ]
29
2018-05-31T20:31:46.000Z
2019-05-28T23:50:13.000Z
bridges/bridges.py
krs-world/bridges-python
2d3a22d637fd75a897cc9f6b2619eeebad5942bb
[ "MIT" ]
3
2018-02-06T20:33:41.000Z
2019-01-02T23:59:36.000Z
from bridges.connector import * from bridges import ColorGrid import os import json class Bridges: """ @brief The bridges class is the main class that provides interfaces to datasets, maintains user and assignment information, and connects to the bridges server. The bridges class is responsible for ...
38.721893
390
0.620416
59e2c601531d026277afbb6e8cc64466b1e73740
497
py
Python
geometry.py
catzilla-007/fractal-overload
5d173124aaefdb84539248e22275fd2ee39522d8
[ "MIT" ]
null
null
null
geometry.py
catzilla-007/fractal-overload
5d173124aaefdb84539248e22275fd2ee39522d8
[ "MIT" ]
null
null
null
geometry.py
catzilla-007/fractal-overload
5d173124aaefdb84539248e22275fd2ee39522d8
[ "MIT" ]
null
null
null
def rotate_left(point_a, point_b, sin, cos): x1, y1 = point_a x2, y2 = point_b x_rot = (x2 * cos) - (y2 * sin) + (x1 * (1 - cos)) + (y1 * sin) y_rot = (x2 * sin) + (y2 * cos) + (y1 * (1 - cos)) - (x1 * sin) return x_rot, y_rot def rotate_right(point_a, point_b, sin, cos): x1, y1 = point_a ...
33.133333
67
0.501006
67d16309eb0384f9fbc1876da5297d43064aa3f7
1,756
py
Python
src/libraries/commands_util.py
ChartsBot/telegram-bots
3cb0966d15c3c1d5b6dd065f01259f3d348be3b2
[ "MIT" ]
null
null
null
src/libraries/commands_util.py
ChartsBot/telegram-bots
3cb0966d15c3c1d5b6dd065f01259f3d348be3b2
[ "MIT" ]
null
null
null
src/libraries/commands_util.py
ChartsBot/telegram-bots
3cb0966d15c3c1d5b6dd065f01259f3d348be3b2
[ "MIT" ]
1
2022-01-19T01:03:06.000Z
2022-01-19T01:03:06.000Z
import re def get_time_query(time_start, time_type): k_hours = 0 k_days = 0 if time_type == 'h' or time_type == 'H': k_hours = time_start if time_type == 'd' or time_type == 'D': k_days = time_start if time_type == 'w' or time_type == 'W': k_days = time_start * 7 if tim...
30.275862
70
0.619021
b2a32515e75126925b17b3899f9b57d0bf0a859b
2,442
py
Python
Frontend/Website/app.py
Om-krishna/AWS-Disaster-Response-Hackathon
0d416d79521f6c96e95145a41dc01c874ed6a98a
[ "Apache-2.0" ]
null
null
null
Frontend/Website/app.py
Om-krishna/AWS-Disaster-Response-Hackathon
0d416d79521f6c96e95145a41dc01c874ed6a98a
[ "Apache-2.0" ]
null
null
null
Frontend/Website/app.py
Om-krishna/AWS-Disaster-Response-Hackathon
0d416d79521f6c96e95145a41dc01c874ed6a98a
[ "Apache-2.0" ]
null
null
null
from geopy.geocoders import Nominatim import json from flask import Flask, jsonify, request, render_template app = Flask(__name__) from flask_sqlalchemy import SQLAlchemy db = SQLAlchemy(app) app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///savedata.db' app.config['SQLALCHEMY_TRACK_MODIFICATION'] = False clas...
34.394366
160
0.627355
b2f3ecd91b3ac06dcf3e967524b6a074be59ddb2
2,050
py
Python
piquiet/app-client.py
massstab/piquiet
b290b6966351d63b9183e68345777d7f67e03e51
[ "MIT" ]
null
null
null
piquiet/app-client.py
massstab/piquiet
b290b6966351d63b9183e68345777d7f67e03e51
[ "MIT" ]
null
null
null
piquiet/app-client.py
massstab/piquiet
b290b6966351d63b9183e68345777d7f67e03e51
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import sys import socket import selectors import traceback import json import libclient sel = selectors.DefaultSelector() def create_request(action, value): if action == "search": return dict( type="text/json", encoding="utf-8", content=dict(ac...
26.282051
68
0.598049
cce4f2e83a0a81eaf0710560c7ecf97265e5abc3
2,544
py
Python
JetStream2/RexBench/OfflineAssembler/convert_asm_to_js.py
ptliu/vera
2b1134fffc5c0eba949adc051c79d6e219317297
[ "BSD-3-Clause" ]
4
2020-06-20T11:48:20.000Z
2020-09-26T03:42:10.000Z
JetStream2/RexBench/OfflineAssembler/convert_asm_to_js.py
ptliu/vera
2b1134fffc5c0eba949adc051c79d6e219317297
[ "BSD-3-Clause" ]
null
null
null
JetStream2/RexBench/OfflineAssembler/convert_asm_to_js.py
ptliu/vera
2b1134fffc5c0eba949adc051c79d6e219317297
[ "BSD-3-Clause" ]
2
2021-04-28T03:11:02.000Z
2022-01-06T22:00:42.000Z
# Copyright (C) 2017 Apple Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the fol...
39.75
104
0.733491
dcdab6e2a656d63173c6ee7fa43289bcd642c00d
563
py
Python
commands/utilidades/servers.py
FelipeSavazii/Lion-BOT
79cb331a2f61b8ca28464b947c2a672fa2ea001c
[ "MIT" ]
1
2021-09-27T01:40:01.000Z
2021-09-27T01:40:01.000Z
commands/utilidades/servers.py
FelipeSavazii/Lion-BOT
79cb331a2f61b8ca28464b947c2a672fa2ea001c
[ "MIT" ]
null
null
null
commands/utilidades/servers.py
FelipeSavazii/Lion-BOT
79cb331a2f61b8ca28464b947c2a672fa2ea001c
[ "MIT" ]
null
null
null
import discord from discord.ext import commands color = 0xf79805 format = "%a, %d %b %Y | %H:%M:%S %ZGMT" class Servers(commands.Cog): def __init__(self, bot): self.bot = bot @commands.command() async def servers(self, ctx): serversinfo = len(self.bot.guilds) embed = discord.Emb...
26.809524
118
0.646536
3ec8b28689e4f5f2793d094b023030740f6ed5d7
93
py
Python
pyeccodes/defs/grib2/tables/17/4_2_2_5_table.py
ecmwf/pyeccodes
dce2c72d3adcc0cb801731366be53327ce13a00b
[ "Apache-2.0" ]
7
2020-04-14T09:41:17.000Z
2021-08-06T09:38:19.000Z
pyeccodes/defs/grib2/tables/19/4_2_2_5_table.py
ecmwf/pyeccodes
dce2c72d3adcc0cb801731366be53327ce13a00b
[ "Apache-2.0" ]
null
null
null
pyeccodes/defs/grib2/tables/19/4_2_2_5_table.py
ecmwf/pyeccodes
dce2c72d3adcc0cb801731366be53327ce13a00b
[ "Apache-2.0" ]
3
2020-04-30T12:44:48.000Z
2020-12-15T08:40:26.000Z
def load(h): return ({'bit': 1, 'on': 1, 'title': 'Glacier temperature', 'units': 'K'},)
31
79
0.537634
af711d2035c37d389638e3cb9719f353e21b4969
2,994
py
Python
tests/unit_tests/test_tethys_services/test_views.py
msouff/tethys
45795d1e6561d5db8fddd838f4d1ae1d91dbb837
[ "BSD-2-Clause" ]
79
2015-10-05T13:13:28.000Z
2022-02-01T12:30:33.000Z
tests/unit_tests/test_tethys_services/test_views.py
msouff/tethys
45795d1e6561d5db8fddd838f4d1ae1d91dbb837
[ "BSD-2-Clause" ]
542
2015-08-12T22:11:32.000Z
2022-03-29T22:18:08.000Z
tests/unit_tests/test_tethys_services/test_views.py
msouff/tethys
45795d1e6561d5db8fddd838f4d1ae1d91dbb837
[ "BSD-2-Clause" ]
71
2016-01-16T01:03:41.000Z
2022-03-31T17:55:54.000Z
import unittest from unittest import mock from tethys_services.views import datasets_home, wps_home, wps_service, wps_process class TethysServicesViewsTests(unittest.TestCase): def setUp(self): pass def tearDown(self): pass @mock.patch('tethys_services.views.render') def test_datas...
43.391304
111
0.738477
99f9a86e952f46a90b1cf69b732c11955d193ade
259
py
Python
src/backend/services/t2s-s2t-service/tests/BaseCase.py
lucastanger/aswe-pda
9e3425fc9aa27b929ec5af5c04b5afa271c09830
[ "MIT" ]
null
null
null
src/backend/services/t2s-s2t-service/tests/BaseCase.py
lucastanger/aswe-pda
9e3425fc9aa27b929ec5af5c04b5afa271c09830
[ "MIT" ]
25
2021-04-13T15:23:26.000Z
2022-03-31T14:08:36.000Z
src/backend/services/t2s-s2t-service/tests/BaseCase.py
lucastanger/aswe-pda
9e3425fc9aa27b929ec5af5c04b5afa271c09830
[ "MIT" ]
5
2021-04-13T14:27:35.000Z
2022-02-09T00:31:33.000Z
# Imports. import unittest import shutil # Import resources. from server import app class BaseCase(unittest.TestCase): def setUp(self): self.app = app.test_client() def tearDown(self): shutil.rmtree('./static', ignore_errors=True)
17.266667
53
0.69112
6399d036bd50deb203376206829bb01ee8754468
3,899
py
Python
docs/source/arrays-and-buffers/arrays-demo.py
bwoodsend/cslug
f9febd5c09d36ae65a7cd40d48f143c65023d717
[ "MIT" ]
2
2021-01-31T13:13:23.000Z
2021-02-21T15:50:34.000Z
docs/source/arrays-and-buffers/arrays-demo.py
bwoodsend/cslug
f9febd5c09d36ae65a7cd40d48f143c65023d717
[ "MIT" ]
null
null
null
docs/source/arrays-and-buffers/arrays-demo.py
bwoodsend/cslug
f9febd5c09d36ae65a7cd40d48f143c65023d717
[ "MIT" ]
null
null
null
from array import array from cslug import CSlug, ptr, anchor slug = CSlug(anchor("arrays-demo.c")) slug.make() assert slug.dll.sum(ptr(array("d", [10, 11, 12])), 3) == 33.0 def sum_(arr): """Wrapper for the ``sum()`` function from ``arrays-demos.c``.""" # If not the correct type: if not (isinstance(arr,...
26.52381
76
0.629905
5fe506bb9c0ff16436d19ea6e758db2da70d7198
10,946
py
Python
rrt_connect.py
xwnb/motion_planning
8b098d862f1c56fe4bc3724cabfde17bcba743ac
[ "MIT" ]
4
2019-12-30T00:30:17.000Z
2019-12-30T02:58:59.000Z
rrt_connect.py
xwnb/motion_planning
8b098d862f1c56fe4bc3724cabfde17bcba743ac
[ "MIT" ]
null
null
null
rrt_connect.py
xwnb/motion_planning
8b098d862f1c56fe4bc3724cabfde17bcba743ac
[ "MIT" ]
1
2021-11-03T08:44:54.000Z
2021-11-03T08:44:54.000Z
import cv2 import numpy as np import copy import random import math class Node(object): def __init__(self, pos=[0, 0]): self.pos = pos self.parent = None class RRT_CONNECT(object): def __init__(self, map_path, qstart, qgoal, grid_size, step_size, max_steps=1000, goal_prob=0....
31.096591
93
0.53636
6e8a6e52ddbbcc5fc856ba6b7a8d6b635c2187de
1,411
py
Python
app/recipe/serializers.py
gillianomenezes/recipe-app-api
fc3ca889fb3feddabb3b9ec416aceb6351a8098f
[ "MIT" ]
null
null
null
app/recipe/serializers.py
gillianomenezes/recipe-app-api
fc3ca889fb3feddabb3b9ec416aceb6351a8098f
[ "MIT" ]
null
null
null
app/recipe/serializers.py
gillianomenezes/recipe-app-api
fc3ca889fb3feddabb3b9ec416aceb6351a8098f
[ "MIT" ]
null
null
null
from rest_framework import serializers from core.models import Tag, Ingredient, Recipe class TagSerializer(serializers.ModelSerializer): """Serializer for tag objects""" class Meta: model = Tag fields = ['id', 'name'] read_only_fields = ['id'] class IngredientSerializer(serializers...
25.654545
71
0.648476
9b622eae66b72db4a781b9f0e46e18974a27063a
1,330
py
Python
python_code/vnev/Lib/site-packages/jdcloud_sdk/services/edcps/apis/DescribeKeypairRequest.py
Ureimu/weather-robot
7634195af388538a566ccea9f8a8534c5fb0f4b6
[ "MIT" ]
14
2018-04-19T09:53:56.000Z
2022-01-27T06:05:48.000Z
python_code/vnev/Lib/site-packages/jdcloud_sdk/services/edcps/apis/DescribeKeypairRequest.py
Ureimu/weather-robot
7634195af388538a566ccea9f8a8534c5fb0f4b6
[ "MIT" ]
15
2018-09-11T05:39:54.000Z
2021-07-02T12:38:02.000Z
python_code/vnev/Lib/site-packages/jdcloud_sdk/services/edcps/apis/DescribeKeypairRequest.py
Ureimu/weather-robot
7634195af388538a566ccea9f8a8534c5fb0f4b6
[ "MIT" ]
33
2018-04-20T05:29:16.000Z
2022-02-17T09:10:05.000Z
# coding=utf8 # Copyright 2018 JDCLOUD.COM # # 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 ...
30.227273
79
0.715789
79cf6da534d3f7dcc691940ff5dd7b12825cc6dd
2,844
py
Python
game.py
marschi/tictactoe_ai
bc92c0c49ad12d93dc8fd0fe532df8106ff734b4
[ "MIT" ]
null
null
null
game.py
marschi/tictactoe_ai
bc92c0c49ad12d93dc8fd0fe532df8106ff734b4
[ "MIT" ]
null
null
null
game.py
marschi/tictactoe_ai
bc92c0c49ad12d93dc8fd0fe532df8106ff734b4
[ "MIT" ]
null
null
null
import numpy as np class InvalidMoveException(Exception): pass class GameOverException(Exception): pass class TicTacToeGame(): def __init__(self, agent1, agent2): # a random player will have the first turn self.turn = np.random.randint(2) self.agents = [agent1, agent2] # s...
41.823529
130
0.608298
4896287169e756c1ef46955e121aaff8ead01146
4,255
py
Python
sdk/python/pulumi_azure_nextgen/alertsmanagement/get_action_rule_by_name.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
31
2020-09-21T09:41:01.000Z
2021-02-26T13:21:59.000Z
sdk/python/pulumi_azure_nextgen/alertsmanagement/get_action_rule_by_name.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
231
2020-09-21T09:38:45.000Z
2021-03-01T11:16:03.000Z
sdk/python/pulumi_azure_nextgen/alertsmanagement/get_action_rule_by_name.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
4
2020-09-29T14:14:59.000Z
2021-02-10T20:38:16.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from .. import _utilities, _tables from ...
31.992481
147
0.633843
b4e38ea6d1c84d582acf27401ff3441436c92d6b
865
py
Python
darwin/importer/formats/csvtags.py
sachasamama/darwin-py
d263132fa3526e0a5ddf4e5cf0450b1ba9d40ef6
[ "MIT" ]
28
2019-10-23T09:05:45.000Z
2022-03-07T16:28:36.000Z
darwin/importer/formats/csvtags.py
sachasamama/darwin-py
d263132fa3526e0a5ddf4e5cf0450b1ba9d40ef6
[ "MIT" ]
91
2019-09-20T10:31:25.000Z
2022-03-30T15:27:17.000Z
darwin/importer/formats/csvtags.py
sachasamama/darwin-py
d263132fa3526e0a5ddf4e5cf0450b1ba9d40ef6
[ "MIT" ]
11
2020-04-02T08:31:37.000Z
2021-12-20T22:57:38.000Z
import csv from pathlib import Path from typing import List, Optional import darwin.datatypes as dt from darwin.path_utils import deconstruct_full_path def parse_file(path: Path) -> Optional[List[dt.AnnotationFile]]: if path.suffix != ".csv": return None files = [] with path.open() as f: ...
34.6
117
0.65896
c35c5b8e5b0e62d02bec02e7255af3f89bccb5d5
1,178
py
Python
Contributor Corner/AfraMP/SpecialStack/SpecialStack.py
hitu1304/interview-corner
97503d1967c646f731275ae3665f142814c6a9d7
[ "MIT" ]
39
2020-11-01T13:58:48.000Z
2021-02-12T08:39:37.000Z
Contributor Corner/AfraMP/SpecialStack/SpecialStack.py
hitu1304/interview-corner
97503d1967c646f731275ae3665f142814c6a9d7
[ "MIT" ]
86
2020-09-25T07:20:40.000Z
2021-02-18T20:36:29.000Z
Contributor Corner/AfraMP/SpecialStack/SpecialStack.py
hitu1304/interview-corner
97503d1967c646f731275ae3665f142814c6a9d7
[ "MIT" ]
43
2020-12-18T03:32:42.000Z
2021-02-19T18:08:19.000Z
class SpecialStack: def __init__(self, n): self.n = n # function should append an element on to the stack def push(self, arr, ele): if len(arr) < self.n: arr.append(ele) else: print("Stack full") # Function to pop an element from stack def p...
21.814815
59
0.508489
2ce55bb2e4b8a9a3290843984211c44797f7b550
6,499
py
Python
rasterio/io.py
QuLogic/rasterio
f9131341d78b610dc0ebe9dc60f99cad6466ba80
[ "BSD-3-Clause" ]
1
2020-10-25T17:32:06.000Z
2020-10-25T17:32:06.000Z
rasterio/io.py
QuLogic/rasterio
f9131341d78b610dc0ebe9dc60f99cad6466ba80
[ "BSD-3-Clause" ]
null
null
null
rasterio/io.py
QuLogic/rasterio
f9131341d78b610dc0ebe9dc60f99cad6466ba80
[ "BSD-3-Clause" ]
null
null
null
"""Classes capable of reading and writing datasets Instances of these classes are called dataset objects. """ import logging from rasterio._base import ( get_dataset_driver, driver_can_create, driver_can_create_copy) from rasterio._io import ( DatasetReaderBase, DatasetWriterBase, BufferedDatasetWriterBase, ...
32.658291
84
0.636252
539b934428d984d541a771566e434376b7d05d4c
3,577
py
Python
organize/filters/filesize.py
awesome-archive/organize
911eeda7aa0c116a042deee2dadee04353459ed2
[ "MIT" ]
1
2020-10-01T05:51:33.000Z
2020-10-01T05:51:33.000Z
organize/filters/filesize.py
davidolrik/organize
b6581531bcdbdb6c0833472b683cbbeaa513f595
[ "MIT" ]
null
null
null
organize/filters/filesize.py
davidolrik/organize
b6581531bcdbdb6c0833472b683cbbeaa513f595
[ "MIT" ]
null
null
null
import operator import re from organize.utils import flattened_string_list, fullpath from .filter import Filter OPERATORS = { "<": operator.lt, "<=": operator.le, "==": operator.eq, "=": operator.eq, "": operator.eq, ">=": operator.ge, ">": operator.gt, } SIZE_REGEX = re.compile( r"^(...
29.808333
85
0.551859
fb665c506b783e12f241768f7d03fbbc666d25ac
1,910
py
Python
tests/integration/modules/test_sysctl.py
velom/salt
f5d4334178c50d0dfcd205d5a7fb9cfb27fd369e
[ "Apache-2.0" ]
1
2021-04-05T19:46:35.000Z
2021-04-05T19:46:35.000Z
tests/integration/modules/test_sysctl.py
dv-trading/salt
f5d4334178c50d0dfcd205d5a7fb9cfb27fd369e
[ "Apache-2.0" ]
null
null
null
tests/integration/modules/test_sysctl.py
dv-trading/salt
f5d4334178c50d0dfcd205d5a7fb9cfb27fd369e
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Import python libs from __future__ import absolute_import import sys # Import Salt Testing libs import tests.integration as integration from tests.support.unit import skipIf class SysctlModuleTest(integration.ModuleCase): def setUp(self): super(SysctlModuleTest, self).setUp() ...
36.730769
77
0.644503
d9718cb6caf9d357cc66997da7c0320d1b8bb039
45
py
Python
src/errors.py
catzilla-007/Gengo-SSE-Coding-Test
a4eb0a49e09ed6d243847242e9fa0097908e650a
[ "MIT" ]
null
null
null
src/errors.py
catzilla-007/Gengo-SSE-Coding-Test
a4eb0a49e09ed6d243847242e9fa0097908e650a
[ "MIT" ]
null
null
null
src/errors.py
catzilla-007/Gengo-SSE-Coding-Test
a4eb0a49e09ed6d243847242e9fa0097908e650a
[ "MIT" ]
null
null
null
class InvalidInputError(TypeError): pass
15
35
0.777778
a76fae67f512c409875faaa1486131a57cff6127
22,515
py
Python
spotify_ripper/main.py
JanGross/spotify-ripper
d3879efa82c61048ba2cafddd25542b96c024ad8
[ "MIT" ]
3
2021-07-28T13:10:40.000Z
2021-11-13T19:24:49.000Z
spotify_ripper/main.py
JanGross/spotify-ripper
d3879efa82c61048ba2cafddd25542b96c024ad8
[ "MIT" ]
null
null
null
spotify_ripper/main.py
JanGross/spotify-ripper
d3879efa82c61048ba2cafddd25542b96c024ad8
[ "MIT" ]
3
2021-08-02T09:51:57.000Z
2022-03-28T02:22:45.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import unicode_literals from colorama import init, Fore, AnsiToWin32 from spotify_ripper.ripper import Ripper from spotify_ripper.utils import * import os import sys import codecs import argparse import pkg_resources import schedule import signal import se...
38.752151
185
0.591961
d3cb67e5de1a4294f8e13ddcc5cda6e09465222d
367
py
Python
hw_asr/augmentations/wave_augmentations/PitchShift.py
iamilyasedunov/asr_project_template
fce2d6925ece333801a80593e451bdbdd2228a59
[ "MIT" ]
null
null
null
hw_asr/augmentations/wave_augmentations/PitchShift.py
iamilyasedunov/asr_project_template
fce2d6925ece333801a80593e451bdbdd2228a59
[ "MIT" ]
null
null
null
hw_asr/augmentations/wave_augmentations/PitchShift.py
iamilyasedunov/asr_project_template
fce2d6925ece333801a80593e451bdbdd2228a59
[ "MIT" ]
null
null
null
import torch_audiomentations from torch import Tensor from hw_asr.augmentations.base import AugmentationBase class PitchShift(AugmentationBase): def __init__(self, *args, **kwargs): self._aug = torch_audiomentations.PitchShift(*args, **kwargs) def __call__(self, data: Tensor): x = data.unsqu...
26.214286
69
0.722071
db278987ce6fd44dae803bc5b894089b547bf944
1,471
py
Python
Experiment_1/src/StarGAN-VC/plot_losses.py
RyoOzaki/myResearch
a8f8ec63e1b1802517b12db2b6f3e286a3984bcf
[ "MIT" ]
null
null
null
Experiment_1/src/StarGAN-VC/plot_losses.py
RyoOzaki/myResearch
a8f8ec63e1b1802517b12db2b6f3e286a3984bcf
[ "MIT" ]
null
null
null
Experiment_1/src/StarGAN-VC/plot_losses.py
RyoOzaki/myResearch
a8f8ec63e1b1802517b12db2b6f3e286a3984bcf
[ "MIT" ]
null
null
null
import numpy as np from pathlib import Path from argparse import ArgumentParser import matplotlib.pyplot as plt parser = ArgumentParser() parser.add_argument("--logdir", type=Path, required=True) parser.add_argument("--dot", type=int, default=-1) parser.add_argument("--begin_iter", type=int, default=0) args = parser...
30.020408
120
0.698844
c713c343e116247fc9eb4f39255733aab0d0a01c
7,834
py
Python
data/download_and_convert_cifar10.py
kshmelkov/gan_evaluation
8583837a8fa796ae8ec4bb503a159a9e0a40cbf7
[ "BSD-3-Clause" ]
10
2019-01-11T08:57:46.000Z
2021-11-24T03:15:47.000Z
data/download_and_convert_cifar10.py
kshmelkov/gan_evaluation
8583837a8fa796ae8ec4bb503a159a9e0a40cbf7
[ "BSD-3-Clause" ]
2
2019-04-13T19:39:24.000Z
2020-03-10T14:45:17.000Z
data/download_and_convert_cifar10.py
kshmelkov/gan_evaluation
8583837a8fa796ae8ec4bb503a159a9e0a40cbf7
[ "BSD-3-Clause" ]
1
2018-12-26T01:47:37.000Z
2018-12-26T01:47:37.000Z
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
34.359649
85
0.68892
86e56f945e28d879a29dbc4438375569dd393cc3
372
py
Python
tests/health_test.py
EdwardApollo/panda
fcec81cbaf58494bf66eef2067efcf1a6d4e4b7f
[ "MIT" ]
1,279
2017-04-07T02:11:39.000Z
2022-03-28T05:01:30.000Z
tests/health_test.py
EdwardApollo/panda
fcec81cbaf58494bf66eef2067efcf1a6d4e4b7f
[ "MIT" ]
473
2017-05-03T06:54:54.000Z
2022-03-31T07:09:12.000Z
tests/health_test.py
EdwardApollo/panda
fcec81cbaf58494bf66eef2067efcf1a6d4e4b7f
[ "MIT" ]
610
2017-04-07T05:17:33.000Z
2022-03-26T14:58:32.000Z
#!/usr/bin/env python3 import time from panda import Panda if __name__ == "__main__": panda_serials = Panda.list() pandas = [] for ps in panda_serials: pandas.append(Panda(serial=ps)) if len(pandas) == 0: print("No pandas connected") assert False while True: for panda in pandas: print(...
19.578947
35
0.645161
06c32554024c4d03586da7d453025c1fb0f84403
1,132
py
Python
lib/pymedphys/_mosaiq/constants.py
ethanio12345/pymedphys
cb34c992de8d442eced3385018a194364060092d
[ "Apache-2.0" ]
207
2019-01-29T09:53:04.000Z
2022-03-26T10:34:03.000Z
lib/pymedphys/_mosaiq/constants.py
ethanio12345/pymedphys
cb34c992de8d442eced3385018a194364060092d
[ "Apache-2.0" ]
1,209
2019-01-29T07:52:27.000Z
2022-03-31T20:11:24.000Z
lib/pymedphys/_mosaiq/constants.py
ethanio12345/pymedphys
cb34c992de8d442eced3385018a194364060092d
[ "Apache-2.0" ]
58
2019-03-29T09:06:18.000Z
2022-03-24T07:44:22.000Z
# Copyright (C) 2018 Cancer Care Associates # 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 ...
22.196078
74
0.594523
8026ceb7ee6524d66e673bd8d5bc15de0950d2f6
1,057
py
Python
tests/test_inventory_screen_objects.py
mgleed/d2r_image
0ba5317e65baa3d7e309866ed11a76ad22b30952
[ "MIT" ]
1
2022-03-29T20:04:48.000Z
2022-03-29T20:04:48.000Z
tests/test_inventory_screen_objects.py
mgleed/d2r_image
0ba5317e65baa3d7e309866ed11a76ad22b30952
[ "MIT" ]
2
2022-03-03T03:33:53.000Z
2022-03-03T18:45:45.000Z
tests/test_inventory_screen_objects.py
mgleed/d2r_image
0ba5317e65baa3d7e309866ed11a76ad22b30952
[ "MIT" ]
2
2022-03-28T18:10:30.000Z
2022-03-29T20:56:02.000Z
# import cv2 # import os # import pytest # from d2r_image import processing # from d2r_image.data_models import D2ItemList # @pytest.mark.parametrize("filename, expected_file", [ # ('all_gems_runes_consumables.png', 'all_gems_runes_consumables.json'), # ]) # def test_inventory(filename: str, expected_file: str): ...
33.03125
81
0.650899
8e66a4eef4c267b8e14876f53f514d01de05a688
45,554
py
Python
recbole/trainer/trainer.py
Wicknight/RecBole
cbfa817e39883ef94f7ab5164db9014028f5ae98
[ "MIT" ]
null
null
null
recbole/trainer/trainer.py
Wicknight/RecBole
cbfa817e39883ef94f7ab5164db9014028f5ae98
[ "MIT" ]
null
null
null
recbole/trainer/trainer.py
Wicknight/RecBole
cbfa817e39883ef94f7ab5164db9014028f5ae98
[ "MIT" ]
null
null
null
# @Time : 2020/6/26 # @Author : Shanlei Mu # @Email : slmu@ruc.edu.cn # UPDATE: # @Time : 2021/6/23, 2020/9/26, 2020/9/26, 2020/10/01, 2020/9/16 # @Author : Zihan Lin, Yupeng Hou, Yushuo Chen, Shanlei Mu, Xingyu Pan # @Email : zhlin@ruc.edu.cn, houyupeng@ruc.edu.cn, chenyushuo@ruc.edu.cn, slmu@ruc.edu.cn, panxy@...
43.509074
167
0.636761
3dc472afb1365f7be8e73cab2947469d392a4cce
444
py
Python
apischema/conversions/__init__.py
wyfo/apimodel
99e6b23504e8ca775fda9dfa93c4e350211c1b8a
[ "MIT" ]
null
null
null
apischema/conversions/__init__.py
wyfo/apimodel
99e6b23504e8ca775fda9dfa93c4e350211c1b8a
[ "MIT" ]
7
2022-02-28T02:37:58.000Z
2022-03-31T02:31:32.000Z
apischema/conversions/__init__.py
wyfo/apimodel
99e6b23504e8ca775fda9dfa93c4e350211c1b8a
[ "MIT" ]
null
null
null
__all__ = [ "AnyConversion", "Conversion", "LazyConversion", "as_names", "as_str", "catch_value_error", "deserializer", "reset_deserializers", "reset_serializer", "serializer", ] from .conversions import AnyConversion, Conversion, LazyConversion from .converters import ( as_n...
19.304348
66
0.671171
e58ae212a3795ba617c97c869837d0546b47dc8a
14
py
Python
examples-tk499-lvgl/main.py
bhgv/micropython-tk499
963d0546dda980aa8502c5be29f6aee3d5cd805e
[ "MIT" ]
1
2021-08-31T02:00:44.000Z
2021-08-31T02:00:44.000Z
examples-tk499-lvgl/main.py
bhgv/micropython-tk499
963d0546dda980aa8502c5be29f6aee3d5cd805e
[ "MIT" ]
null
null
null
examples-tk499-lvgl/main.py
bhgv/micropython-tk499
963d0546dda980aa8502c5be29f6aee3d5cd805e
[ "MIT" ]
null
null
null
import w_ex
3.5
11
0.714286
d55201950f81f6198261204215ef02a57eb77b20
248
py
Python
meister_tools/droptable.py
Odatas/MeisterTools
fc8559c5ecb293f5342e8091c4aafeeb2d8c6d0a
[ "MIT" ]
2
2019-02-08T08:19:17.000Z
2019-02-08T23:16:16.000Z
meister_tools/droptable.py
Odatas/MeisterTools
fc8559c5ecb293f5342e8091c4aafeeb2d8c6d0a
[ "MIT" ]
1
2019-02-11T09:04:09.000Z
2019-02-11T09:04:09.000Z
meister_tools/droptable.py
Odatas/MeisterTools
fc8559c5ecb293f5342e8091c4aafeeb2d8c6d0a
[ "MIT" ]
2
2019-02-08T23:21:18.000Z
2019-02-10T08:59:24.000Z
# -*- coding: utf-8 -*- """ Created on Thu Jan 17 23:33:14 2019 @author: Paddy """ import sqlite3 from . import path_db conn = sqlite3.connect(str(path_db)) c = conn.cursor() c.execute('''DROP TABLE ungeheuer ''') print("Success")
16.533333
39
0.625
7e2f535dd7a9316579c833655a85c4b6ed53abd6
661
py
Python
Week8/week8_con/manage.py
AloTech-Full-Stack-Bootcamp/oguz-ozsen
3d95f7e82e444f53133c11f666874516ca9669af
[ "MIT" ]
null
null
null
Week8/week8_con/manage.py
AloTech-Full-Stack-Bootcamp/oguz-ozsen
3d95f7e82e444f53133c11f666874516ca9669af
[ "MIT" ]
null
null
null
Week8/week8_con/manage.py
AloTech-Full-Stack-Bootcamp/oguz-ozsen
3d95f7e82e444f53133c11f666874516ca9669af
[ "MIT" ]
null
null
null
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): """Run administrative tasks.""" os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'week8.settings') try: from django.core.management import execute_from_command_line except Import...
28.73913
73
0.677761
31e313bde9ee5727a565671d9aa1c6c30ee82e61
938
py
Python
output/models/nist_data/atomic/g_year/schema_instance/nistschema_sv_iv_atomic_g_year_enumeration_2_xsd/nistschema_sv_iv_atomic_g_year_enumeration_2.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
1
2021-08-14T17:59:21.000Z
2021-08-14T17:59:21.000Z
output/models/nist_data/atomic/g_year/schema_instance/nistschema_sv_iv_atomic_g_year_enumeration_2_xsd/nistschema_sv_iv_atomic_g_year_enumeration_2.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
4
2020-02-12T21:30:44.000Z
2020-04-15T20:06:46.000Z
output/models/nist_data/atomic/g_year/schema_instance/nistschema_sv_iv_atomic_g_year_enumeration_2_xsd/nistschema_sv_iv_atomic_g_year_enumeration_2.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
null
null
null
from dataclasses import dataclass, field from enum import Enum from typing import Optional from xsdata.models.datatype import XmlPeriod __NAMESPACE__ = "NISTSchema-SV-IV-atomic-gYear-enumeration-2-NS" class NistschemaSvIvAtomicGYearEnumeration2Type(Enum): VALUE_2007 = XmlPeriod("2007") VALUE_2020 = XmlPeriod...
28.424242
71
0.707889
e3daefc1f44c42fa8c2f08d2a732d48b5e01d364
2,255
py
Python
mdot_rest/admin.py
uw-it-aca/mdot-rest
3f5aa88ae2ac9693f283b8843ac8998b10dc7bb8
[ "Apache-2.0" ]
null
null
null
mdot_rest/admin.py
uw-it-aca/mdot-rest
3f5aa88ae2ac9693f283b8843ac8998b10dc7bb8
[ "Apache-2.0" ]
67
2015-07-23T23:22:14.000Z
2022-02-04T21:39:43.000Z
mdot_rest/admin.py
uw-it-aca/mdot-rest
3f5aa88ae2ac9693f283b8843ac8998b10dc7bb8
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 from django.conf import settings from django.contrib import admin from .models import * from uw_saml.utils import is_member_of_group admin_group = settings.ADMIN_AUTHZ_GROUP class SAMLAdminSite(admin.AdminSite): def has_per...
27.839506
79
0.692683
5fed6658806f038fc7a2c155856b1bee40895b50
9,155
py
Python
rlmolecule/alphazero/tensorflow/tfalphazero_problem.py
harrysorensennrel/rlmolecule
978269400b90f752bf4741f42f03522603b321e2
[ "BSD-3-Clause" ]
null
null
null
rlmolecule/alphazero/tensorflow/tfalphazero_problem.py
harrysorensennrel/rlmolecule
978269400b90f752bf4741f42f03522603b321e2
[ "BSD-3-Clause" ]
null
null
null
rlmolecule/alphazero/tensorflow/tfalphazero_problem.py
harrysorensennrel/rlmolecule
978269400b90f752bf4741f42f03522603b321e2
[ "BSD-3-Clause" ]
null
null
null
import itertools import logging import os import time from abc import abstractmethod from functools import partial from pathlib import Path from typing import Dict, Optional, Tuple import numpy as np import sqlalchemy import tensorflow as tf from tensorflow.python.keras.preprocessing.sequence import pad_sequences fro...
46.709184
116
0.633206
e1d6b891e2db865eb8eb170607d741e0c6abd680
1,723
py
Python
junk/coordination/coordination_game.py
rtloftin/interactive_agents
f7d57d1421000b2e8a79a9dff179b8fe7c8d3fc0
[ "MIT" ]
null
null
null
junk/coordination/coordination_game.py
rtloftin/interactive_agents
f7d57d1421000b2e8a79a9dff179b8fe7c8d3fc0
[ "MIT" ]
5
2022-03-11T07:58:53.000Z
2022-03-17T12:57:26.000Z
junk/coordination/coordination_game.py
rtloftin/interactive_agents
f7d57d1421000b2e8a79a9dff179b8fe7c8d3fc0
[ "MIT" ]
1
2022-03-11T19:28:53.000Z
2022-03-11T19:28:53.000Z
import numpy as np class CoordinationGame: def __init__(self, num_players=2, num_actions=10, noise=0.0, focal_point=False, focal_payoff=0.9, other_play=False): self._num_players = num_players self._num_actions = num_actions ...
30.22807
81
0.558909
8bfdec9201ddebdb2c5d4e12c3ff6d576dd13a68
533
py
Python
lax/tests.py
Shavolski/Instagram-Clone
978f169bca9596ff2b205db9e84061743d6c780e
[ "Unlicense" ]
1
2019-11-22T19:13:36.000Z
2019-11-22T19:13:36.000Z
lax/tests.py
Shavolski/Instagram-Clone
978f169bca9596ff2b205db9e84061743d6c780e
[ "Unlicense" ]
null
null
null
lax/tests.py
Shavolski/Instagram-Clone
978f169bca9596ff2b205db9e84061743d6c780e
[ "Unlicense" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from . models import Post, Profile from django.test import TestCase from django.contrib.auth.models import User class ImageTestClass(TestCase): def setUp(self): self.user = User.objects.create_user('Steve','Wachira') self.image = Image...
38.071429
131
0.722326
3e90377a8a3f758b9ba469829f4e0985f479a73f
1,949
py
Python
ns-allinone-3.27/ns-3.27/.waf-1.8.19-b1fc8f7baef51bd2db4c2971909a568d/waflib/Tools/kde4.py
zack-braun/4607_NS
43c8fb772e5552fb44bd7cd34173e73e3fb66537
[ "MIT" ]
93
2019-04-21T08:22:26.000Z
2022-03-30T04:26:29.000Z
ns-allinone-3.27/ns-3.27/.waf-1.8.19-b1fc8f7baef51bd2db4c2971909a568d/waflib/Tools/kde4.py
zack-braun/4607_NS
43c8fb772e5552fb44bd7cd34173e73e3fb66537
[ "MIT" ]
12
2019-04-19T16:39:58.000Z
2021-06-22T13:18:32.000Z
ns-allinone-3.27/ns-3.27/.waf-1.8.19-b1fc8f7baef51bd2db4c2971909a568d/waflib/Tools/kde4.py
zack-braun/4607_NS
43c8fb772e5552fb44bd7cd34173e73e3fb66537
[ "MIT" ]
21
2019-05-27T19:36:12.000Z
2021-07-26T02:37:41.000Z
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! https://waf.io/book/index.html#_obtaining_the_waf_file import os,re from waflib import Task,Utils from waflib.TaskGen import feature @feature('msgfmt') def apply_msgfmt(self): for lang in self.to_list(self.langs): node=self.path.find_resource(lang+'.p...
39.77551
175
0.717291
4a7f9379bfd6656276749feb82a1b17588ff1ecd
1,448
py
Python
setup.py
tjhei/meshio
1a89df15484ccbfba64397098a2288a1a9d439fa
[ "MIT" ]
3
2021-06-12T17:58:35.000Z
2021-06-23T13:43:37.000Z
setup.py
dbeurle/meshio
4815445c2a6ffff0617c935f0c86eac393aacbaf
[ "MIT" ]
null
null
null
setup.py
dbeurle/meshio
4815445c2a6ffff0617c935f0c86eac393aacbaf
[ "MIT" ]
null
null
null
import codecs import os from setuptools import find_packages, setup # https://packaging.python.org/single_source_version/ base_dir = os.path.abspath(os.path.dirname(__file__)) about = {} with open(os.path.join(base_dir, "meshio", "__about__.py"), "rb") as f: exec(f.read(), about) def read(fname): return cod...
30.166667
78
0.63674
450f2a334a810de34da71736d542dc6f373cf0f3
7,451
py
Python
pypesto/objective/function.py
curtywang/pyPESTO
3dc1aa92b0c2a09d335995edcc994ef2c9e582df
[ "BSD-3-Clause" ]
null
null
null
pypesto/objective/function.py
curtywang/pyPESTO
3dc1aa92b0c2a09d335995edcc994ef2c9e582df
[ "BSD-3-Clause" ]
null
null
null
pypesto/objective/function.py
curtywang/pyPESTO
3dc1aa92b0c2a09d335995edcc994ef2c9e582df
[ "BSD-3-Clause" ]
null
null
null
import numpy as np from .base import ObjectiveBase, ResultDict from typing import Callable, Sequence, Tuple, Union, Any from .constants import MODE_FUN, MODE_RES, FVAL, GRAD, HESS, RES, SRES class Objective(ObjectiveBase): """ The objective class allows the user explicitely specify functions that comput...
30.662551
77
0.52342
6078a61277adf7d806fff2c90fd90ac6a9bfad71
936
py
Python
courses/python_scrimba/09ListBasics/exercise.py
CaioSilva88/100daysofcode
caeb3da047fdb648f369b59a53a511c18a95a7a3
[ "MIT" ]
80
2020-09-19T22:32:35.000Z
2022-03-18T12:31:53.000Z
courses/python_scrimba/09ListBasics/exercise.py
CaioSilva88/100daysofcode
caeb3da047fdb648f369b59a53a511c18a95a7a3
[ "MIT" ]
2
2020-09-21T19:41:06.000Z
2021-01-27T02:55:44.000Z
courses/python_scrimba/09ListBasics/exercise.py
CaioSilva88/100daysofcode
caeb3da047fdb648f369b59a53a511c18a95a7a3
[ "MIT" ]
14
2020-08-25T01:14:03.000Z
2020-12-09T20:22:16.000Z
# SELLING LEMONADE # The lists show number of lemonades sold per week # Profit for each lemonade sold is 1.5$ # 1- Add another day to week 2 list by capturing a number as input # 2- Combine the two lists into the list called 'sales # 3- Calculate/print how much you have earned on: best day, worst day, separately and in...
29.25
94
0.705128
4c8c896bd6322b2d632fea04b2a36360b0752968
4,167
py
Python
projects/vehicle_modeling/lateral_dynamic_VI_bicycle.py
echoix/pyro
787920cb14e3669bc65c530fd8f91d4277a24279
[ "MIT" ]
null
null
null
projects/vehicle_modeling/lateral_dynamic_VI_bicycle.py
echoix/pyro
787920cb14e3669bc65c530fd8f91d4277a24279
[ "MIT" ]
null
null
null
projects/vehicle_modeling/lateral_dynamic_VI_bicycle.py
echoix/pyro
787920cb14e3669bc65c530fd8f91d4277a24279
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Fri Nov 16 12:01:07 2018 @author: Alexandre """ ############################################################################### import numpy as np ############################################################################### from pyro.dynamic import vehicle from pyro.control ...
32.811024
125
0.593952
209b1c0acec066d92679c2c6b2798d1d3f198366
870
py
Python
sdk/python/bouncerapi/exceptions/api_exception.py
nmfta-repo/nmfta-bouncer
a178244dbf0b8a165aabc02a5d1ba05006f9ec22
[ "Apache-2.0" ]
1
2021-04-09T20:29:39.000Z
2021-04-09T20:29:39.000Z
sdk/python/bouncerapi/exceptions/api_exception.py
nmfta-repo/nmfta-bouncer
a178244dbf0b8a165aabc02a5d1ba05006f9ec22
[ "Apache-2.0" ]
21
2019-02-28T14:23:11.000Z
2020-07-07T20:46:37.000Z
sdk/python/bouncerapi/exceptions/api_exception.py
nmfta-repo/nmfta-bouncer
a178244dbf0b8a165aabc02a5d1ba05006f9ec22
[ "Apache-2.0" ]
2
2019-05-07T13:16:49.000Z
2020-06-23T13:49:01.000Z
# -*- coding: utf-8 -*- """ bouncerapi This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ). """ class APIException(Exception): """Class that handles HTTP Exceptions when fetching API Endpoints. Attributes: response_code (int): The status code of the response. ...
26.363636
83
0.601149
0913327cd23dcc6b1007e64ec9f23eeec62ae8dd
1,153
py
Python
CryptoCalculatorService/PricesService.py
athanikos/CryptoCalculatorService
71dc0adb9f0f04ea15fcd7793f7e4ef922972f0a
[ "MIT" ]
null
null
null
CryptoCalculatorService/PricesService.py
athanikos/CryptoCalculatorService
71dc0adb9f0f04ea15fcd7793f7e4ef922972f0a
[ "MIT" ]
null
null
null
CryptoCalculatorService/PricesService.py
athanikos/CryptoCalculatorService
71dc0adb9f0f04ea15fcd7793f7e4ef922972f0a
[ "MIT" ]
null
null
null
from datetime import datetime from cryptodataaccess.Rates.RatesRepository import RatesRepository from cryptodataaccess.Rates.RatesMongoStore import RatesMongoStore from flask import jsonify from CryptoCalculatorService.helpers import log_error DEFAULT_CURRENCY = "EUR" DATE_FORMAT = "%Y-%m-%d" PROJECT_NAME = "Calcula...
34.939394
75
0.746748
4fd035a8efa5b0554dcbc597ddb95865501e0411
1,216
py
Python
setup.py
yoona-ai/stylegan2-pytorch
eceb8aacb669f19b79cc74c7160a85252b1086d6
[ "MIT" ]
2,954
2020-01-09T21:21:16.000Z
2022-03-31T21:10:44.000Z
setup.py
yoona-ai/stylegan2-pytorch
eceb8aacb669f19b79cc74c7160a85252b1086d6
[ "MIT" ]
259
2020-01-14T01:04:08.000Z
2022-03-17T07:14:52.000Z
setup.py
yoona-ai/stylegan2-pytorch
eceb8aacb669f19b79cc74c7160a85252b1086d6
[ "MIT" ]
558
2020-01-12T14:12:40.000Z
2022-03-31T02:25:36.000Z
import sys from setuptools import setup, find_packages sys.path[0:0] = ['stylegan2_pytorch'] from version import __version__ setup( name = 'stylegan2_pytorch', packages = find_packages(), entry_points={ 'console_scripts': [ 'stylegan2_pytorch = stylegan2_pytorch.cli:main', ], }, versio...
27.636364
88
0.634868
bba95ca04fdc9a7e8255da95306737004bcb4499
2,170
py
Python
setup.py
larsclaussen/threedi-ws-client
e16eadf92d944d4fd576915bd42d44553b2fc5ee
[ "MIT" ]
null
null
null
setup.py
larsclaussen/threedi-ws-client
e16eadf92d944d4fd576915bd42d44553b2fc5ee
[ "MIT" ]
null
null
null
setup.py
larsclaussen/threedi-ws-client
e16eadf92d944d4fd576915bd42d44553b2fc5ee
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """The setup script.""" from setuptools import setup, find_packages import codecs import os import re here = os.path.abspath(os.path.dirname(__file__)) def read(*parts): with codecs.open(os.path.join(here, *parts), 'r') as fp: return fp.read() with open('...
28.933333
83
0.66682
1afc45488c2e6d1b98985fb372f56b6710e9fe4b
11,439
py
Python
scripts/alt_evaluation/flair_vs_litbank_gs.py
therosko/Thesis-NER-in-English-novels
7988c3aa4f904e91b1e674090dbdc6487b4ad042
[ "Apache-2.0" ]
null
null
null
scripts/alt_evaluation/flair_vs_litbank_gs.py
therosko/Thesis-NER-in-English-novels
7988c3aa4f904e91b1e674090dbdc6487b4ad042
[ "Apache-2.0" ]
null
null
null
scripts/alt_evaluation/flair_vs_litbank_gs.py
therosko/Thesis-NER-in-English-novels
7988c3aa4f904e91b1e674090dbdc6487b4ad042
[ "Apache-2.0" ]
null
null
null
######################################################################################################################## # This script reads in the Litbank gold standard and compairs it to the Flair output files # The data used here consists of only the 12 overlapping novels with their respecive overlapping # parts of ...
51.995455
163
0.568144
00c6258c4ac79f2e0b3360d90a83ea4f6973627f
204
py
Python
cms/order_manager/admin.py
egineering-llc/egat_example_project
3480f31cb31f77bf8bcc837f527d0ceef05a7281
[ "MIT" ]
4
2015-05-01T20:28:58.000Z
2019-02-09T15:51:58.000Z
cms/order_manager/admin.py
egineering-llc/egat_example_project
3480f31cb31f77bf8bcc837f527d0ceef05a7281
[ "MIT" ]
2
2020-06-05T17:00:53.000Z
2021-06-10T17:44:32.000Z
cms/order_manager/admin.py
egineering-llc/egat_example_project
3480f31cb31f77bf8bcc837f527d0ceef05a7281
[ "MIT" ]
3
2015-08-31T17:04:31.000Z
2019-02-09T12:47:17.000Z
from django.contrib import admin from .models import Customer, Product, Order, Payment admin.site.register(Customer) admin.site.register(Product) admin.site.register(Order) admin.site.register(Payment)
22.666667
53
0.813725
9931bf19e6fad0343295c32af7690ae378a4eb10
406
py
Python
utils.py
supplepentan/penta-blendgan-vscode-remote-container
224b108de091a1cdf7d0747f7bf4380bbf0d6c49
[ "MIT" ]
403
2021-11-01T06:26:27.000Z
2022-03-30T12:18:34.000Z
utils.py
supplepentan/penta-blendgan-vscode-remote-container
224b108de091a1cdf7d0747f7bf4380bbf0d6c49
[ "MIT" ]
13
2021-11-20T08:09:23.000Z
2022-01-03T10:21:39.000Z
utils.py
supplepentan/penta-blendgan-vscode-remote-container
224b108de091a1cdf7d0747f7bf4380bbf0d6c49
[ "MIT" ]
48
2021-11-01T06:48:43.000Z
2022-03-28T02:30:33.000Z
import torch def cv2ten(img, device): img = (img[:, :, ::-1].transpose(2, 0, 1) / 255. - 0.5) / 0.5 img_ten = torch.from_numpy(img).float().unsqueeze(0).to(device) return img_ten def ten2cv(img_ten, bgr=True): img = img_ten.squeeze(0).mul_(0.5).add_(0.5).mul_(255).clamp_(0, 255).permute(1, 2, 0).to(...
25.375
121
0.583744
ce47a82084512bde3ba12bc796a78db24ef7505f
39,600
py
Python
code/test_png.py
topin89/pypng
dc5df017245b2366133d863e37e9429f80af5a6c
[ "MIT" ]
null
null
null
code/test_png.py
topin89/pypng
dc5df017245b2366133d863e37e9429f80af5a6c
[ "MIT" ]
null
null
null
code/test_png.py
topin89/pypng
dc5df017245b2366133d863e37e9429f80af5a6c
[ "MIT" ]
null
null
null
# This file comprises the tests that are internally validated (as # opposed to tests which produce output files that are externally # validated). Primarily they are unittests. # There is a read/write asymmetry: It is fairly easy to # internally validate the results of reading a PNG file because we # can know what pix...
32.890365
78
0.554167
f74b906a1952f0ebfd7ae4e2e3e57c4a56150472
3,739
py
Python
YamlVariablesLibrary/tests/run_tests.py
jbarnes007/robotframework-yamlvariableslibrary
7f32a554a84fa039fc505643672edc971bf09b26
[ "Apache-2.0" ]
1
2015-10-05T10:43:25.000Z
2015-10-05T10:43:25.000Z
YamlVariablesLibrary/tests/run_tests.py
jbarnes007/robotframework-yamlvariableslibrary
7f32a554a84fa039fc505643672edc971bf09b26
[ "Apache-2.0" ]
null
null
null
YamlVariablesLibrary/tests/run_tests.py
jbarnes007/robotframework-yamlvariableslibrary
7f32a554a84fa039fc505643672edc971bf09b26
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python import env import os import sys from subprocess import Popen, call from tempfile import TemporaryFile #from run_unit_tests import run_unit_tests ROBOT_ARGS = [ '--doc', 'YamlVariablesOutput', '--outputdir', '%(outdir)s', '--escape', 'space:SP', '--report', 'none', '--log', '...
33.990909
459
0.652046
a29572cbf92239c6282bc88ed1d0fe06a717e0cf
7,204
py
Python
test/test_sentry_processor.py
sbdchd/structlog-sentry
18adbfdac85930ca5578e7ef95c1f2dc169c2f2f
[ "MIT" ]
null
null
null
test/test_sentry_processor.py
sbdchd/structlog-sentry
18adbfdac85930ca5578e7ef95c1f2dc169c2f2f
[ "MIT" ]
null
null
null
test/test_sentry_processor.py
sbdchd/structlog-sentry
18adbfdac85930ca5578e7ef95c1f2dc169c2f2f
[ "MIT" ]
null
null
null
import logging import pytest from structlog_sentry import SentryJsonProcessor, SentryProcessor class MockLogger: def __init__(self, name): self.name = name def test_sentry_disabled(): processor = SentryProcessor(active=False) event_dict = processor(None, None, {"level": "error"}) assert ev...
32.745455
86
0.679484
24c0e3f55092738231a319375e7a959c3f3e1cc2
16,934
py
Python
clearml/utilities/resource_monitor.py
thepycoder/clearml
717edba8c2b39fb7486bd2aba9ca0294f309b4c3
[ "Apache-2.0" ]
2,097
2019-06-11T14:36:25.000Z
2020-12-21T03:52:59.000Z
clearml/utilities/resource_monitor.py
thepycoder/clearml
717edba8c2b39fb7486bd2aba9ca0294f309b4c3
[ "Apache-2.0" ]
247
2019-06-11T15:10:26.000Z
2020-12-21T17:34:32.000Z
clearml/utilities/resource_monitor.py
thepycoder/clearml
717edba8c2b39fb7486bd2aba9ca0294f309b4c3
[ "Apache-2.0" ]
256
2019-06-11T14:36:28.000Z
2020-12-18T08:32:47.000Z
import logging import os import platform import sys import warnings from time import time import psutil from pathlib2 import Path from typing import Text from .process.mp import BackgroundMonitor from ..backend_api import Session from ..binding.frameworks.tensorflow_bind import IsTensorboardInit try: from .gpu i...
44.680739
120
0.593481
573b84be1b5eb0f6f1601bcb987b8e281e40b158
1,033
py
Python
var/spack/repos/builtin/packages/py-py2neo/package.py
adrianjhpc/spack
0a9e4fcee57911f2db586aa50c8873d9cca8de92
[ "ECL-2.0", "Apache-2.0", "MIT" ]
2
2020-10-15T01:08:42.000Z
2021-10-18T01:28:18.000Z
var/spack/repos/builtin/packages/py-py2neo/package.py
adrianjhpc/spack
0a9e4fcee57911f2db586aa50c8873d9cca8de92
[ "ECL-2.0", "Apache-2.0", "MIT" ]
2
2019-07-30T10:12:28.000Z
2019-12-17T09:02:27.000Z
var/spack/repos/builtin/packages/py-py2neo/package.py
adrianjhpc/spack
0a9e4fcee57911f2db586aa50c8873d9cca8de92
[ "ECL-2.0", "Apache-2.0", "MIT" ]
5
2019-07-30T09:42:14.000Z
2021-01-25T05:39:20.000Z
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PyPy2neo(PythonPackage): """Py2neo is a client library and toolkit for working with Neo4j ...
44.913043
95
0.775411
15d7d10b4bf1f39112738251dbe0a9b5d0f08a61
1,067
py
Python
src/model.py
namjals/forecast
bd85f24c0aada541ef4b09f90974d8f0bfebce64
[ "Apache-2.0" ]
null
null
null
src/model.py
namjals/forecast
bd85f24c0aada541ef4b09f90974d8f0bfebce64
[ "Apache-2.0" ]
null
null
null
src/model.py
namjals/forecast
bd85f24c0aada541ef4b09f90974d8f0bfebce64
[ "Apache-2.0" ]
null
null
null
import numpy as np from layers import Operation, MSE class LinearRegression: def __init__(self): # 기울기와 편향 초기화 m = 0.01 * np.random.randn(1, 1) b = 0.01 * np.random.randn(1, 1) # 계층 생성 self.layers = [ Operation(m, b) ] self.loss_layer = MSE() ...
24.813953
48
0.538894
ba32d42717420b3227004b28fd8c8f34a62cf48f
240
py
Python
.history/ClassFiles/Functions/Functions_20210101225630.py
minefarmer/Comprehensive-Python
f97b9b83ec328fc4e4815607e6a65de90bb8de66
[ "Unlicense" ]
null
null
null
.history/ClassFiles/Functions/Functions_20210101225630.py
minefarmer/Comprehensive-Python
f97b9b83ec328fc4e4815607e6a65de90bb8de66
[ "Unlicense" ]
null
null
null
.history/ClassFiles/Functions/Functions_20210101225630.py
minefarmer/Comprehensive-Python
f97b9b83ec328fc4e4815607e6a65de90bb8de66
[ "Unlicense" ]
null
null
null
''' FUNCTIONS Functions are pieces(block) of code that does something. They are reusable. They execute or run when called by thier name. They can have parameters(variables) and arguments(values) They can return data as a result. '''
34.285714
57
0.754167
74b0f5fcbf76f2ef0fb29c590ab1969b9cbd3de3
1,204
py
Python
hackerrank/domain/algorithms/dynamic-programming/maximum_subarray/solution.py
spradeepv/dive-into-python
ec27d4686b7b007d21f9ba4f85d042be31ee2639
[ "MIT" ]
null
null
null
hackerrank/domain/algorithms/dynamic-programming/maximum_subarray/solution.py
spradeepv/dive-into-python
ec27d4686b7b007d21f9ba4f85d042be31ee2639
[ "MIT" ]
null
null
null
hackerrank/domain/algorithms/dynamic-programming/maximum_subarray/solution.py
spradeepv/dive-into-python
ec27d4686b7b007d21f9ba4f85d042be31ee2639
[ "MIT" ]
null
null
null
def max_subarray(A): max_ending_here = max_so_far = 0 length = len(A) if length > 1: for i in range(0, length): x = A[i] max_ending_here = max(0, max_ending_here + x) max_so_far = max(max_so_far, max_ending_here) #print "max_ending_here : ",max_ending_...
25.617021
67
0.530731
aadf7d810aa5d298aa044cbff7f0f6a02aa63928
2,155
py
Python
tests/components/litterrobot/conftest.py
tbarbette/core
8e58c3aa7bc8d2c2b09b6bd329daa1c092d52d3c
[ "Apache-2.0" ]
1
2017-05-30T22:21:05.000Z
2017-05-30T22:21:05.000Z
tests/components/litterrobot/conftest.py
tbarbette/core
8e58c3aa7bc8d2c2b09b6bd329daa1c092d52d3c
[ "Apache-2.0" ]
58
2020-08-03T07:33:02.000Z
2022-03-31T06:02:05.000Z
tests/components/litterrobot/conftest.py
tbarbette/core
8e58c3aa7bc8d2c2b09b6bd329daa1c092d52d3c
[ "Apache-2.0" ]
2
2021-03-22T21:42:48.000Z
2021-04-12T12:26:39.000Z
"""Configure pytest for Litter-Robot tests.""" from typing import Optional from unittest.mock import AsyncMock, MagicMock, patch import pylitterbot from pylitterbot import Robot import pytest from homeassistant.components import litterrobot from .common import CONFIG, ROBOT_DATA from tests.common import MockConfigE...
29.930556
74
0.716937
cf2bc58951ae0b0232f583578b7ac4637d28bf06
1,067
py
Python
prometheus_grafana_deploy/cli/stop.py
ZhaoNeil/prometheus-grafana-deploy
c8ec609970d64f8d4104d8810dc301aff3df9232
[ "MIT" ]
null
null
null
prometheus_grafana_deploy/cli/stop.py
ZhaoNeil/prometheus-grafana-deploy
c8ec609970d64f8d4104d8810dc301aff3df9232
[ "MIT" ]
null
null
null
prometheus_grafana_deploy/cli/stop.py
ZhaoNeil/prometheus-grafana-deploy
c8ec609970d64f8d4104d8810dc301aff3df9232
[ "MIT" ]
1
2022-01-10T14:51:10.000Z
2022-01-10T14:51:10.000Z
import prometheus_grafana_deploy.cli.util as _cli_util from prometheus_grafana_deploy.stop import stop as _stop '''CLI module to stop a running Prometheus cluster.''' def subparser(subparsers): '''Register subparser modules''' stopparser = subparsers.add_parser('stop', help='Stop Prometheus on a cluster.') ...
41.038462
134
0.735708
3d93b80495cf4d661879ab2309502852dd3f9de0
2,339
py
Python
2021/18a.py
combatopera/advent2020
6fa54e91ef1a5443dff36c15e65892701293201f
[ "Unlicense" ]
2
2021-12-04T00:02:12.000Z
2021-12-11T05:38:45.000Z
2021/18a.py
combatopera/advent2020
6fa54e91ef1a5443dff36c15e65892701293201f
[ "Unlicense" ]
null
null
null
2021/18a.py
combatopera/advent2020
6fa54e91ef1a5443dff36c15e65892701293201f
[ "Unlicense" ]
1
2020-12-20T18:50:54.000Z
2020-12-20T18:50:54.000Z
#!/usr/bin/env python3 from collections import namedtuple from pathlib import Path class Address(namedtuple('BaseAddress', 'number index')): def mirror(self): return type(self)(self.number, 1 - self.index) def replace(self, n): self.number[self.index] = n def _invoker(name): return lamb...
24.113402
89
0.566481
33f6165e20d3e5ed31fc2b207c1c45354cd037a7
80,669
py
Python
hy/compiler.py
sheganinans/hy
d7c333e61c88fdc73414cf42c9ec33861e4a9ed9
[ "MIT" ]
null
null
null
hy/compiler.py
sheganinans/hy
d7c333e61c88fdc73414cf42c9ec33861e4a9ed9
[ "MIT" ]
null
null
null
hy/compiler.py
sheganinans/hy
d7c333e61c88fdc73414cf42c9ec33861e4a9ed9
[ "MIT" ]
null
null
null
# -*- encoding: utf-8 -*- # Copyright 2021 the authors. # This file is part of Hy, which is free software licensed under the Expat # license. See the LICENSE. from hy.models import (HyObject, HyExpression, HyKeyword, HyInteger, HyComplex, HyString, HyFComponent, HyFString, HyBytes, HySymbol, ...
37.890559
198
0.552418
bfba20c36a4a7363ad27dd79eec822e3db50928d
219
py
Python
class4/C4_Exercises/HW1_searchCursor.py
wontgruber/python-for-gis
09e85a4d2f31395c37f75ea6648646d9e621c081
[ "MIT" ]
null
null
null
class4/C4_Exercises/HW1_searchCursor.py
wontgruber/python-for-gis
09e85a4d2f31395c37f75ea6648646d9e621c081
[ "MIT" ]
null
null
null
class4/C4_Exercises/HW1_searchCursor.py
wontgruber/python-for-gis
09e85a4d2f31395c37f75ea6648646d9e621c081
[ "MIT" ]
null
null
null
""" In Central_Phila.gdb Use a SearchCursor to count the number of avenues in Central Philadelphia based on the StreetCenterlines 'ST_TYPE' field """ # Import modules # Set variables # Execute operation
16.846154
68
0.730594
d86c468cfd081fd2831f1b878dc561919137d0b0
16,083
py
Python
selfdrive/monitoring/driver_monitor.py
hikee9123/openpilogt_0814
aba817833355bbf7db6d4c149aca52efcdea2c23
[ "MIT" ]
null
null
null
selfdrive/monitoring/driver_monitor.py
hikee9123/openpilogt_0814
aba817833355bbf7db6d4c149aca52efcdea2c23
[ "MIT" ]
null
null
null
selfdrive/monitoring/driver_monitor.py
hikee9123/openpilogt_0814
aba817833355bbf7db6d4c149aca52efcdea2c23
[ "MIT" ]
null
null
null
from math import atan2 from cereal import car from common.numpy_fast import interp from common.realtime import DT_DMON from selfdrive.hardware import TICI from common.filter_simple import FirstOrderFilter from common.stat_live import RunningStatFilter EventName = car.CarEvent.EventName # ****************************...
49.334356
194
0.719766
12e3d2edf1db5398f06af9963462534674ab6003
395
py
Python
groupwork/asgi.py
AbugaAroni/GroupWorkDjango
c6da6ef1322da0a1045dcf54ef65e21eb3923a73
[ "MIT" ]
null
null
null
groupwork/asgi.py
AbugaAroni/GroupWorkDjango
c6da6ef1322da0a1045dcf54ef65e21eb3923a73
[ "MIT" ]
null
null
null
groupwork/asgi.py
AbugaAroni/GroupWorkDjango
c6da6ef1322da0a1045dcf54ef65e21eb3923a73
[ "MIT" ]
null
null
null
""" ASGI config for groupwork project. It exposes the ASGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/ """ import os from django.core.asgi import get_asgi_application os.environ.setdefault('DJANGO_SET...
23.235294
78
0.787342
f3592941d1e37acd1f8d228206816f5f2f9204b1
35,384
py
Python
tensorflow/python/ops/nn_test.py
pankajkgupta/tensorflow
043c6b0b642d630cb34ebdad17df668effec880f
[ "Apache-2.0" ]
1
2019-06-12T09:23:29.000Z
2019-06-12T09:23:29.000Z
tensorflow/python/ops/nn_test.py
cydonia999/Multiplicative_Integration_RNN
51a91cfa79172476e3aa07cfcbb5bd415981d54b
[ "Apache-2.0" ]
null
null
null
tensorflow/python/ops/nn_test.py
cydonia999/Multiplicative_Integration_RNN
51a91cfa79172476e3aa07cfcbb5bd415981d54b
[ "Apache-2.0" ]
1
2020-11-28T09:33:35.000Z
2020-11-28T09:33:35.000Z
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
39.098343
80
0.651877
497b3227dbd1c3706a0b347f9e461e966845f633
1,827
py
Python
pyvistaqt/utils.py
p-j-smith/pyvistaqt
9334f9d937792cfa1f692e936b35b89a46260851
[ "MIT" ]
null
null
null
pyvistaqt/utils.py
p-j-smith/pyvistaqt
9334f9d937792cfa1f692e936b35b89a46260851
[ "MIT" ]
2
2020-05-15T03:56:29.000Z
2020-05-15T15:25:45.000Z
pyvistaqt/utils.py
p-j-smith/pyvistaqt
9334f9d937792cfa1f692e936b35b89a46260851
[ "MIT" ]
null
null
null
"""This module contains utilities routines.""" from typing import Any, List, Optional, Type import pyvista import scooby # type: ignore from qtpy.QtWidgets import QApplication, QMenuBar def _check_type(var: Any, var_name: str, var_types: List[Type[Any]]) -> None: types = tuple(var_types) if not isinstance(v...
29
77
0.669951
8c558046123089eef19cdd0e31a31d5520c960e9
8,499
py
Python
capone/tests/test_ledger_balances.py
keinagae/capone
56beaf5aaea4ad073f0d535c86658d81e927156d
[ "MIT" ]
null
null
null
capone/tests/test_ledger_balances.py
keinagae/capone
56beaf5aaea4ad073f0d535c86658d81e927156d
[ "MIT" ]
null
null
null
capone/tests/test_ledger_balances.py
keinagae/capone
56beaf5aaea4ad073f0d535c86658d81e927156d
[ "MIT" ]
null
null
null
from collections import defaultdict from decimal import Decimal from django.db.models import F from django.test import TransactionTestCase from capone.api.actions import create_transaction from capone.api.actions import credit from capone.api.actions import debit from capone.api.actions import void_transaction from c...
39.901408
76
0.637722
826ec111e87290c6a3c75b6015f60a816441a6ab
22,779
py
Python
calibre/model/tailfree_process.py
jereliu/aden-tf
cff0a79db81f424e82c126b87292d92848212f2b
[ "Apache-2.0" ]
1
2020-10-26T21:19:59.000Z
2020-10-26T21:19:59.000Z
calibre/model/tailfree_process.py
jereliu/aden-tf
cff0a79db81f424e82c126b87292d92848212f2b
[ "Apache-2.0" ]
7
2018-09-16T17:50:59.000Z
2018-11-06T03:56:02.000Z
calibre/model/tailfree_process.py
jereliu/aden-tf
cff0a79db81f424e82c126b87292d92848212f2b
[ "Apache-2.0" ]
2
2019-10-14T19:56:49.000Z
2020-05-15T17:05:55.000Z
"""Model definition and variational family for Dependent Tail-free Process Prior. #### References [1]: Alejandro Jara and Timothy Hanson. A class of mixtures of dependent tail-free processes. _Biometrika. 2011;98(3):553-566._. 2011 [2]: Eswar G. Phadia. Tailfree Processes. In: Prior Processes and Their Appli...
42.57757
111
0.646824
050d34b71cdd67ad0586dac21d92ab95a1417bd8
8,084
py
Python
tests/tests.py
andersk/django-manifest-loader
6d57a9883ac06198da625229cf15f210bc74164b
[ "BSD-3-Clause" ]
null
null
null
tests/tests.py
andersk/django-manifest-loader
6d57a9883ac06198da625229cf15f210bc74164b
[ "BSD-3-Clause" ]
null
null
null
tests/tests.py
andersk/django-manifest-loader
6d57a9883ac06198da625229cf15f210bc74164b
[ "BSD-3-Clause" ]
null
null
null
from django.conf import settings from django.test import SimpleTestCase from django.template import TemplateSyntaxError, Context, Template from django.core.cache import cache from manifest_loader.templatetags.manifest import strip_quotes, \ find_manifest_path, WebpackManifestNotFound, get_manifest, APP_SETTINGS, \...
32.207171
78
0.564572
bc232cc77e71c9e0c9aab7c66e8fe23bd34d6734
1,509
py
Python
public/scriptgpio.py
vleclerc/raspibar
e7d089b74f0e6f1490cb2faacf5c9f79f51bbdc3
[ "MIT" ]
null
null
null
public/scriptgpio.py
vleclerc/raspibar
e7d089b74f0e6f1490cb2faacf5c9f79f51bbdc3
[ "MIT" ]
1
2021-10-06T20:38:38.000Z
2021-10-06T20:38:38.000Z
public/scriptgpio.py
vleclerc/raspibar
e7d089b74f0e6f1490cb2faacf5c9f79f51bbdc3
[ "MIT" ]
1
2019-12-28T19:13:22.000Z
2019-12-28T19:13:22.000Z
#!/usr/bin/python import sys, time, ntpath import RPi.GPIO as GPIO class colors: SUCCESS = '\033[92m' WARNING = '\033[93m' ERROR = '\033[91m' RESET = '\033[0m' class GpioException(Exception): pass try: scriptName = ntpath.basename(sys.argv[0]) #if len(sys.argv) != 3: # raise GpioExcepti...
22.522388
215
0.60835
6745c985fbff9f34e471ad35ac14ccb183e8530e
859
py
Python
migrations/versions/003_add_multimention_table.py
belak/python-seabird
743127e216f70c07228fee11fddd2bad38fcc4af
[ "MIT" ]
null
null
null
migrations/versions/003_add_multimention_table.py
belak/python-seabird
743127e216f70c07228fee11fddd2bad38fcc4af
[ "MIT" ]
33
2015-12-03T23:38:38.000Z
2021-12-13T19:40:30.000Z
migrations/versions/003_add_multimention_table.py
belak/python-seabird
743127e216f70c07228fee11fddd2bad38fcc4af
[ "MIT" ]
2
2016-04-09T20:59:03.000Z
2016-05-01T20:02:45.000Z
"""Add multimention table Revision ID: 003 Revises: 002 Create Date: 2016-04-08 10:53:44.115348 """ # revision identifiers, used by Alembic. revision = '003' down_revision = '002' branch_labels = None depends_on = None from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated b...
24.542857
70
0.686845
8209ccbfb240f5ffe050068b25bef541ec32df49
934
py
Python
tickit/devices/eiger/eiger_status.py
dls-controls/tickit
00bb013e69674bcfe4926f365ecb3c65c080abe8
[ "Apache-2.0" ]
4
2021-09-16T13:35:33.000Z
2022-02-01T23:35:53.000Z
tickit/devices/eiger/eiger_status.py
dls-controls/tickit
00bb013e69674bcfe4926f365ecb3c65c080abe8
[ "Apache-2.0" ]
46
2021-09-16T13:44:58.000Z
2022-02-02T13:42:56.000Z
tickit/devices/eiger/eiger_status.py
dls-controls/tickit
00bb013e69674bcfe4926f365ecb3c65c080abe8
[ "Apache-2.0" ]
null
null
null
from dataclasses import dataclass, field, fields from datetime import datetime from enum import Enum from typing import Any, List class State(Enum): """Possible states of the Eiger detector.""" NA = "na" READY = "ready" INITIALIZE = "initialize" CONFIGURE = "configure" ACQUIRE = "acquire" ...
25.944444
61
0.646681
5213232613d1b68fa296e0e8fd7772dbed9b0c89
3,173
py
Python
ferris/core/request_parsers.py
palladius/gae-ferris-ricc
e6d9d8d4aadeae10eb258b94b6fe5912c8630b36
[ "MIT" ]
2
2015-03-04T07:05:57.000Z
2015-03-04T07:06:00.000Z
ferris/core/request_parsers.py
palladius/gae-ferris-ricc
e6d9d8d4aadeae10eb258b94b6fe5912c8630b36
[ "MIT" ]
null
null
null
ferris/core/request_parsers.py
palladius/gae-ferris-ricc
e6d9d8d4aadeae10eb258b94b6fe5912c8630b36
[ "MIT" ]
null
null
null
import inspect import json _parsers = {} def factory(name): """ Returns a constructed request parser instance by name """ global _parsers if inspect.isclass(name): return name return _parsers.get(name.lower(), _parsers.get(name.lower() + 'parser'))() class RequestParser(object): ...
26.22314
97
0.640719
c39212e8196010240e64151be1ef12eff0ad5ef2
4,041
py
Python
third_party/WebKit/Tools/Scripts/webkitpy/formatter/main.py
Wzzzx/chromium-crosswalk
768dde8efa71169f1c1113ca6ef322f1e8c9e7de
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
1
2020-07-15T09:50:14.000Z
2020-07-15T09:50:14.000Z
third_party/WebKit/Tools/Scripts/webkitpy/formatter/main.py
Wzzzx/chromium-crosswalk
768dde8efa71169f1c1113ca6ef322f1e8c9e7de
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
third_party/WebKit/Tools/Scripts/webkitpy/formatter/main.py
Wzzzx/chromium-crosswalk
768dde8efa71169f1c1113ca6ef322f1e8c9e7de
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
6
2020-09-23T08:56:12.000Z
2021-11-18T03:40:49.000Z
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import argparse import lib2to3.refactor from webkitpy.common.system.systemhost import SystemHost from webkitpy.thirdparty import autopep8 def parse_args(a...
36.736364
121
0.640188
7e978ef5bb08538354fc5d2092eacfd897e4430b
1,526
py
Python
image_thumbnails_demo/convert.py
yadudoc/parsl_demos
f77d4abaa41a722edf35ec17227b0c0674251778
[ "Apache-2.0" ]
null
null
null
image_thumbnails_demo/convert.py
yadudoc/parsl_demos
f77d4abaa41a722edf35ec17227b0c0674251778
[ "Apache-2.0" ]
null
null
null
image_thumbnails_demo/convert.py
yadudoc/parsl_demos
f77d4abaa41a722edf35ec17227b0c0674251778
[ "Apache-2.0" ]
null
null
null
from parsl import * import os from os.path import abspath import argparse dfk = DataFlowKernel(ThreadPoolExecutor(max_workers=8)) @App('python', dfk) def process_image(photo, outputdir): """ Process an image file. """ import os import subprocess max_xdim = 260 print("Photo : ", photo) pho...
28.259259
109
0.646134
bebd180d94deff59ee8f9f56ae8dd1d1cb3fd781
568
py
Python
index.py
xfelipesobral/contador
a0c7ede9ada382af3d650f29464f28287f2a9c57
[ "MIT" ]
null
null
null
index.py
xfelipesobral/contador
a0c7ede9ada382af3d650f29464f28287f2a9c57
[ "MIT" ]
null
null
null
index.py
xfelipesobral/contador
a0c7ede9ada382af3d650f29464f28287f2a9c57
[ "MIT" ]
null
null
null
import cv2 imagem = cv2.imread('arquivos/11.jpg', cv2.COLOR_BGR2GRAY) # Importa imagem em escala de cinza arestas = cv2.Canny(imagem, 30, 200) # Pega arestas da imagem contours, hierarchy = cv2.findContours(arestas, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_NONE) # Joga contornos da imagem em uma matriz cv2.drawContours(i...
35.5
130
0.735915
3402ecf7761453275189d1221ba6fd3894fb96d3
1,074
py
Python
notes.py
NewEvolution/serialization
3947988b2a327a31ebebd4506dd617e817b2e5f0
[ "MIT" ]
null
null
null
notes.py
NewEvolution/serialization
3947988b2a327a31ebebd4506dd617e817b2e5f0
[ "MIT" ]
null
null
null
notes.py
NewEvolution/serialization
3947988b2a327a31ebebd4506dd617e817b2e5f0
[ "MIT" ]
null
null
null
import pickle class Notes: def __init__(self): self.notes = [] try: self.notes =self.deserialize() except FileNotFoundError: pass def prompt(self): note = input('Enter a note or command\n> ') if note == 'ls': [print(str(key) + ' • ' ...
23.347826
83
0.487896
0808c5ad56abe937457b849d41e1f2999446e499
2,852
py
Python
samples/auth/auth_dict.py
isunnapud/vantiv-sdk-for-python
85ea6ba160c2436a305b9326cbb7d6c8f127c57c
[ "MIT" ]
4
2017-11-16T16:02:06.000Z
2021-05-04T14:40:08.000Z
samples/auth/auth_dict.py
isunnapud/vantiv-sdk-for-python
85ea6ba160c2436a305b9326cbb7d6c8f127c57c
[ "MIT" ]
7
2017-08-23T15:04:38.000Z
2020-04-07T20:20:15.000Z
samples/auth/auth_dict.py
isunnapud/vantiv-sdk-for-python
85ea6ba160c2436a305b9326cbb7d6c8f127c57c
[ "MIT" ]
13
2017-10-17T22:07:57.000Z
2022-03-29T17:33:42.000Z
# -*- coding: utf-8 -*- # Copyright (c) 2017 Vantiv eCommerce # # 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, ...
37.038961
114
0.701613
388cf4349d79db499602f9984465f8367d0c0452
29,160
py
Python
5algo/algorithms/gui/algo_three.py
allengrr/deadlock_project
933878077c45a7df04daa087407bb2620c064617
[ "MIT" ]
null
null
null
5algo/algorithms/gui/algo_three.py
allengrr/deadlock_project
933878077c45a7df04daa087407bb2620c064617
[ "MIT" ]
null
null
null
5algo/algorithms/gui/algo_three.py
allengrr/deadlock_project
933878077c45a7df04daa087407bb2620c064617
[ "MIT" ]
1
2021-03-21T17:54:26.000Z
2021-03-21T17:54:26.000Z
from functools import reduce from sys import * import numpy as np import random as r import socket import struct import subprocess as sp import threading from threading import Thread import ast import time import datetime as dt import os import psutil from netifaces import interfaces, ifaddresses, AF_INET import paho.m...
32.32816
118
0.562997