hexsha
stringlengths
40
40
size
int64
4
1.02M
ext
stringclasses
8 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
209
max_stars_repo_name
stringlengths
5
121
max_stars_repo_head_hexsha
stringlengths
40
40
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
4
209
max_issues_repo_name
stringlengths
5
121
max_issues_repo_head_hexsha
stringlengths
40
40
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
4
209
max_forks_repo_name
stringlengths
5
121
max_forks_repo_head_hexsha
stringlengths
40
40
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
4
1.02M
avg_line_length
float64
1.07
66.1k
max_line_length
int64
4
266k
alphanum_fraction
float64
0.01
1
16e9af755d7eb3177034c92addc6e7600a83eed5
7,837
py
Python
pcdet/utils/common_utils.py
prithusuresh/semantic-point-generation
e9dd107b86e6068bd1de38b6dc177108a54deee1
[ "Apache-2.0" ]
1
2022-02-23T12:36:32.000Z
2022-02-23T12:36:32.000Z
pcdet/utils/common_utils.py
prithusuresh/semantic-point-generation
e9dd107b86e6068bd1de38b6dc177108a54deee1
[ "Apache-2.0" ]
1
2022-02-23T12:20:14.000Z
2022-02-23T12:41:40.000Z
pcdet/utils/common_utils.py
prithusuresh/semantic-point-generation
e9dd107b86e6068bd1de38b6dc177108a54deee1
[ "Apache-2.0" ]
null
null
null
import logging import os import pickle import random import shutil import subprocess import numpy as np import torch import torch.distributed as dist import torch.multiprocessing as mp def check_numpy_to_torch(x): if isinstance(x, np.ndarray): return torch.from_numpy(x).float(), True return x, False ...
31.223108
116
0.67041
d6f0e5ecdab0ebba1e45dae5007a94c27100a498
63,959
py
Python
gslib/commands/cp.py
zakrywilson/gsutil
e13bdb44341361a67e43828aabd00999dc74d05d
[ "Apache-2.0" ]
null
null
null
gslib/commands/cp.py
zakrywilson/gsutil
e13bdb44341361a67e43828aabd00999dc74d05d
[ "Apache-2.0" ]
null
null
null
gslib/commands/cp.py
zakrywilson/gsutil
e13bdb44341361a67e43828aabd00999dc74d05d
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2011 Google Inc. All Rights Reserved. # Copyright 2011, Nexenta Systems 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/...
47.306953
91
0.693163
3c041f771cd64441f910817acd50ce634acc781e
846
py
Python
absa_app/views.py
temujin-lampasa/ABSA-app
18f2cb1e9cec429126712d0160e19ffb0851fd07
[ "MIT" ]
null
null
null
absa_app/views.py
temujin-lampasa/ABSA-app
18f2cb1e9cec429126712d0160e19ffb0851fd07
[ "MIT" ]
null
null
null
absa_app/views.py
temujin-lampasa/ABSA-app
18f2cb1e9cec429126712d0160e19ffb0851fd07
[ "MIT" ]
null
null
null
from django.shortcuts import render from django.http import HttpResponse from .forms import VideoLinkForm # Create your views here. def index(request): print("METHOD", request.method) context = {} if request.method=="POST": print("POST req made") form = VideoLinkForm(request.POST) ...
31.333333
94
0.612293
11bd07213e92c9515df3b6063c5a11a7d4c75aa3
4,456
py
Python
Knn/knn.py
TonyHinjos/Machine-Learning-Algorithms-Toolkit
7f322e148ee5b9908e6ea02f7692838ec08501d3
[ "MIT" ]
1
2015-11-05T23:57:57.000Z
2015-11-05T23:57:57.000Z
knn/knn.py
urandu/machine-learning-assignments
6c6f727a4b2dd00a1ac3ee755bcf36390781d2b6
[ "Apache-2.0" ]
null
null
null
knn/knn.py
urandu/machine-learning-assignments
6c6f727a4b2dd00a1ac3ee755bcf36390781d2b6
[ "Apache-2.0" ]
null
null
null
import numpy as np import scipy.spatial.distance as ssd import time def read_data(fn): """ read dataset and separate into input data and label data """ # read dataset file with open(fn) as f: raw_data = np.loadtxt(f, delimiter= ',', dtype="float", skiprows=1, usecols=None...
31.602837
76
0.582361
b6d44d8688b2291d40ff28cf1609e47737ed5f9a
262
py
Python
0-python-tutorial/15-whileLoops02.py
luis2ra/py3-00-w3schools
6bb851837f8ef9520491d13fa2c909047c9b18cf
[ "MIT" ]
null
null
null
0-python-tutorial/15-whileLoops02.py
luis2ra/py3-00-w3schools
6bb851837f8ef9520491d13fa2c909047c9b18cf
[ "MIT" ]
null
null
null
0-python-tutorial/15-whileLoops02.py
luis2ra/py3-00-w3schools
6bb851837f8ef9520491d13fa2c909047c9b18cf
[ "MIT" ]
null
null
null
# Demo Python While Loops - The break Statement ''' The break Statement With the break statement we can stop the loop even if the while condition is true. ''' # Exit the loop when i is 3: i = 1 while i < 6: print(i) if i == 3: break i += 1
18.714286
82
0.629771
c70b4b0e9819bafc3cabbbf8422d0f6acb6e8088
1,732
py
Python
marqeta/response_models/card_product_response.py
marqeta/marqeta-python
66fa690eb910825c510a391720b0fe717fac0234
[ "MIT" ]
21
2019-04-12T09:02:17.000Z
2022-02-18T11:39:06.000Z
marqeta/response_models/card_product_response.py
marqeta/marqeta-python
66fa690eb910825c510a391720b0fe717fac0234
[ "MIT" ]
1
2020-07-22T21:27:40.000Z
2020-07-23T17:38:43.000Z
marqeta/response_models/card_product_response.py
marqeta/marqeta-python
66fa690eb910825c510a391720b0fe717fac0234
[ "MIT" ]
10
2019-05-08T14:20:37.000Z
2021-09-20T18:09:26.000Z
from datetime import datetime, date from marqeta.response_models.card_product_config import CardProductConfig from marqeta.response_models import datetime_object import json import re class CardProductResponse(object): def __init__(self, json_response): self.json_response = json_response def __str__(...
26.646154
102
0.687644
53fc76e031e1712a7eab962daa2b997a7de4ea0d
495
py
Python
mum/update/modules/pgrastertime.py
mapgears/maritime-update-manager
5a08a3fc609e4a37c758e52dbf2f4fd6ae541bc7
[ "MIT" ]
null
null
null
mum/update/modules/pgrastertime.py
mapgears/maritime-update-manager
5a08a3fc609e4a37c758e52dbf2f4fd6ae541bc7
[ "MIT" ]
1
2022-01-13T01:08:28.000Z
2022-01-13T01:08:28.000Z
mum/update/modules/pgrastertime.py
mapgears/maritime-update-manager
5a08a3fc609e4a37c758e52dbf2f4fd6ae541bc7
[ "MIT" ]
null
null
null
from __future__ import annotations from subprocess import run, CompletedProcess from mum.util.pipenv import get_pipenv_project from . import UpdateModule class PgRasterTimeUpdater(UpdateModule): def __init__(self, pgrastertime_location, **kwargs): self.pipenv_project = get_pipenv_project(pgrastertime_lo...
29.117647
71
0.767677
97bc3416c0cb4b57aa90e9bd7bec5dad7c26fd45
7,631
py
Python
addons/warn.py
T3CHNOLOG1C/SpaceCore
62f2154f851c4de894906b1d32fe29a1188f9612
[ "Apache-2.0" ]
null
null
null
addons/warn.py
T3CHNOLOG1C/SpaceCore
62f2154f851c4de894906b1d32fe29a1188f9612
[ "Apache-2.0" ]
1
2018-10-21T02:50:49.000Z
2018-10-21T02:50:49.000Z
addons/warn.py
T3CHNOLOG1C/SpaceCore
62f2154f851c4de894906b1d32fe29a1188f9612
[ "Apache-2.0" ]
8
2018-10-21T02:47:31.000Z
2020-05-28T17:44:47.000Z
from discord.ext import commands from discord import Member, Embed from discord.errors import Forbidden from json import load, dump from time import strftime, localtime from addons.utils.logger import Logger class Warn(commands.Cog): """ Warning system """ def __init__(self, bot): self.bot ...
37.22439
146
0.559822
3f1f3781e488c1cf8199fb7bc8d2db2207641570
158,190
py
Python
Lib/test/test_xml_etree.py
shawwn/cpython
0ff8a3b374286d2218fc18f47556a5ace202dad3
[ "0BSD" ]
7
2021-01-12T07:15:38.000Z
2021-09-30T07:14:27.000Z
Lib/test/test_xml_etree.py
shawwn/cpython
0ff8a3b374286d2218fc18f47556a5ace202dad3
[ "0BSD" ]
17
2018-01-26T13:23:58.000Z
2022-03-01T13:44:36.000Z
Lib/test/test_xml_etree.py
shawwn/cpython
0ff8a3b374286d2218fc18f47556a5ace202dad3
[ "0BSD" ]
3
2021-03-27T21:47:45.000Z
2021-06-03T14:48:47.000Z
# IMPORTANT: the same tests are run from "test_xml_etree_c" in order # to ensure consistency between the C implementation and the Python # implementation. # # For this purpose, the module-level "ET" symbol is temporarily # monkey-patched when running the "test_xml_etree_c" test suite. import copy import functools impo...
37.989914
217
0.549219
984b9d176c06cb2e2754e101124a677c0cda8888
7,792
py
Python
src/stactools/palsar/stac.py
developmentseed/stactools-palsar
076700150ecc2999b3aca19761d6a1e21654a302
[ "Apache-2.0" ]
null
null
null
src/stactools/palsar/stac.py
developmentseed/stactools-palsar
076700150ecc2999b3aca19761d6a1e21654a302
[ "Apache-2.0" ]
19
2022-02-01T18:00:07.000Z
2022-03-31T18:13:35.000Z
src/stactools/palsar/stac.py
developmentseed/stactools-palsar
076700150ecc2999b3aca19761d6a1e21654a302
[ "Apache-2.0" ]
null
null
null
import logging import os from typing import Dict import rasterio # type: ignore from dateutil.parser import isoparse from pystac import (Asset, CatalogType, Collection, Extent, Item, Link, MediaType, SpatialExtent, Summaries, TemporalExtent) from pystac.extensions.item_assets import ItemAssetsExte...
34.477876
89
0.626412
6ede1a4f6c9d504c4747a76cc5a7b8fc329cb05d
8,984
py
Python
lineage/UpwardRecursion.py
meyer-lab/tHMM
22e51a2035e76c39a2b1355d1e44ad9ed977dfd4
[ "MIT" ]
1
2022-03-17T21:05:23.000Z
2022-03-17T21:05:23.000Z
lineage/UpwardRecursion.py
meyer-lab/tHMM
22e51a2035e76c39a2b1355d1e44ad9ed977dfd4
[ "MIT" ]
310
2020-07-08T14:14:08.000Z
2022-03-23T18:04:57.000Z
lineage/UpwardRecursion.py
meyer-lab/tHMM
22e51a2035e76c39a2b1355d1e44ad9ed977dfd4
[ "MIT" ]
1
2020-12-21T04:54:56.000Z
2020-12-21T04:54:56.000Z
"""This file contains the methods that completes the downward recursion and evaulates the beta values.""" import numpy as np def get_Marginal_State_Distributions(tHMMobj): r"""Marginal State Distribution (MSD) matrix and recursion. This is the probability that a hidden state variable :math:`z_n` is of st...
44.039216
121
0.668299
4de38882878a7b0505441543f0b805e2701ccb89
6,130
py
Python
huaweicloud-sdk-gaussdbfornosql/huaweicloudsdkgaussdbfornosql/v3/model/list_instances_by_tags_request_body.py
NQLoong/huaweicloud-sdk-python-v3
677944a0b722147c6e105c53df9110724d64152a
[ "Apache-2.0" ]
1
2021-11-03T07:54:50.000Z
2021-11-03T07:54:50.000Z
huaweicloud-sdk-gaussdbfornosql/huaweicloudsdkgaussdbfornosql/v3/model/list_instances_by_tags_request_body.py
mawenbo-huawei/huaweicloud-sdk-python-v3
677944a0b722147c6e105c53df9110724d64152a
[ "Apache-2.0" ]
null
null
null
huaweicloud-sdk-gaussdbfornosql/huaweicloudsdkgaussdbfornosql/v3/model/list_instances_by_tags_request_body.py
mawenbo-huawei/huaweicloud-sdk-python-v3
677944a0b722147c6e105c53df9110724d64152a
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 import pprint import re import six class ListInstancesByTagsRequestBody: """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name a...
28.119266
126
0.581077
ee8db18b7b365158079986262ac86d590dfa84dd
3,331
py
Python
pip_rewind/versions.py
Amar1729/pip-rewind
a335f5c2b836fa169f7037872dff4a2f7d26232d
[ "MIT" ]
4
2021-07-02T20:55:54.000Z
2021-07-03T12:48:45.000Z
pip_rewind/versions.py
Amar1729/pip-rewind
a335f5c2b836fa169f7037872dff4a2f7d26232d
[ "MIT" ]
null
null
null
pip_rewind/versions.py
Amar1729/pip-rewind
a335f5c2b836fa169f7037872dff4a2f7d26232d
[ "MIT" ]
null
null
null
#! /usr/bin/env python3 import datetime from dateutil import parser from itertools import starmap from typing import Generator, Optional, Tuple import requests import rss_parser import pytz from result import Ok, Err, Result from tzlocal import get_localzone dt = datetime.datetime def _use_local_tz(date: dt) -> ...
30.559633
116
0.663464
cf761a98fc933eb32c9a008d1fd9b17c12adbbae
10,028
py
Python
Code/wfmg/callbacks/arima_controller.py
CodeSurge97/Data-Science-Workflow-Manager
dd101b4fb6ab41d39256e98f7e290453e2c147e9
[ "MIT" ]
1
2020-09-23T21:44:40.000Z
2020-09-23T21:44:40.000Z
Code/wfmg/callbacks/arima_controller.py
fiu-airlab/Data-Science-Workflow-Manager
dd101b4fb6ab41d39256e98f7e290453e2c147e9
[ "MIT" ]
null
null
null
Code/wfmg/callbacks/arima_controller.py
fiu-airlab/Data-Science-Workflow-Manager
dd101b4fb6ab41d39256e98f7e290453e2c147e9
[ "MIT" ]
null
null
null
from .. import app, cache from ..dash_app_model import arima_model, arima_df, fare_arima_df, start_index, end_index, today import plotly.graph_objs as go import pandas as pd from dash.dependencies import Input, Output, State from datetime import datetime import numpy as np from .graph_utilities import * @app.callback(...
41.098361
148
0.623953
b756281204f3cc6ec0e8b71053e4a778c10fff45
671
py
Python
manage.py
matez0/crypto-wallet-service
e3d88414a4004af8d2fc35c4164630abe17b5c88
[ "MIT" ]
null
null
null
manage.py
matez0/crypto-wallet-service
e3d88414a4004af8d2fc35c4164630abe17b5c88
[ "MIT" ]
null
null
null
manage.py
matez0/crypto-wallet-service
e3d88414a4004af8d2fc35c4164630abe17b5c88
[ "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', 'django_project.settings') try: from django.core.management import execute_from_command_line exce...
27.958333
78
0.681073
702a00eacb420e31adbd512437440ad3f26313ad
7,369
py
Python
fuzzinator/ui/wui/wui.py
renatahodovan/fuzzinator
49e6cf1b5dad59e82f7bed5f14b23dbd7c520ad0
[ "BSD-3-Clause" ]
202
2016-10-21T00:19:59.000Z
2022-03-07T07:05:57.000Z
fuzzinator/ui/wui/wui.py
renatahodovan/fuzzinator
49e6cf1b5dad59e82f7bed5f14b23dbd7c520ad0
[ "BSD-3-Clause" ]
16
2016-11-27T05:36:25.000Z
2021-08-10T14:42:48.000Z
fuzzinator/ui/wui/wui.py
renatahodovan/fuzzinator
49e6cf1b5dad59e82f7bed5f14b23dbd7c520ad0
[ "BSD-3-Clause" ]
43
2016-10-21T00:19:31.000Z
2022-03-07T07:06:54.000Z
# Copyright (c) 2019 Tamas Keri. # Copyright (c) 2019-2021 Renata Hodovan, Akos Kiss. # # Licensed under the BSD 3-Clause License # <LICENSE.rst or https://opensource.org/licenses/BSD-3-Clause>. # This file may not be copied, modified, or distributed except # according to those terms. import logging import os import s...
41.167598
163
0.631836
c4d75355c54aceed1f5ebbdc0b3263376b49358a
3,312
py
Python
pypureclient/flasharray/FA_2_10/models/remote_protection_group_response.py
Flav-STOR-WL/py-pure-client
03b889c997d90380ac5d6380ca5d5432792d3e89
[ "BSD-2-Clause" ]
14
2018-12-07T18:30:27.000Z
2022-02-22T09:12:33.000Z
pypureclient/flasharray/FA_2_10/models/remote_protection_group_response.py
Flav-STOR-WL/py-pure-client
03b889c997d90380ac5d6380ca5d5432792d3e89
[ "BSD-2-Clause" ]
28
2019-09-17T21:03:52.000Z
2022-03-29T22:07:35.000Z
pypureclient/flasharray/FA_2_10/models/remote_protection_group_response.py
Flav-STOR-WL/py-pure-client
03b889c997d90380ac5d6380ca5d5432792d3e89
[ "BSD-2-Clause" ]
15
2020-06-11T15:50:08.000Z
2022-03-21T09:27:25.000Z
# coding: utf-8 """ FlashArray REST API No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: 2.10 Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re import six import typing from ...
29.571429
150
0.563708
bfc44ce9e934fd37936d00306e3841dc3040f041
1,091
py
Python
dydra/account.py
dydra/dydra.py
f02f1322f1fbacb8f18d5a34fb36e5f339109336
[ "Unlicense" ]
1
2017-02-04T18:10:43.000Z
2017-02-04T18:10:43.000Z
dydra/account.py
dydra/dydra.py
f02f1322f1fbacb8f18d5a34fb36e5f339109336
[ "Unlicense" ]
null
null
null
dydra/account.py
dydra/dydra.py
f02f1322f1fbacb8f18d5a34fb36e5f339109336
[ "Unlicense" ]
null
null
null
import dydra ## # Represents a Dydra.com user account. # # @see http://docs.dydra.com/sdk/python class Account(dydra.Resource): """Represents a Dydra.com user account.""" ## # (Attribute) The account name. name = None ## # @param name A valid account name. def __init__(self, name, **kwargs): self.n...
26.609756
83
0.678277
672c4d59dff4706252ebf025b9989ca668a98fa5
8,099
py
Python
src/encoded/audit/experiment_series.py
procha2/encoded
e9f122362b71f3b8641023b8d2d5ad531d3484b7
[ "MIT" ]
102
2015-05-20T01:17:43.000Z
2022-03-07T06:03:55.000Z
src/encoded/audit/experiment_series.py
procha2/encoded
e9f122362b71f3b8641023b8d2d5ad531d3484b7
[ "MIT" ]
901
2015-01-07T23:11:57.000Z
2022-03-18T13:56:12.000Z
src/encoded/audit/experiment_series.py
procha2/encoded
e9f122362b71f3b8641023b8d2d5ad531d3484b7
[ "MIT" ]
65
2015-02-06T23:00:26.000Z
2022-01-22T07:58:44.000Z
from snovault import ( AuditFailure, audit_checker, ) from .formatter import ( audit_link, path_to_text, ) def generate_formatted_list_of_experiments(list_of_experiments): list_of_experiments = list(list_of_experiments) if len(list_of_experiments) < 3: formatted_list = ' and '.join([audit_link(pat...
38.751196
117
0.678108
ec5e56e4d7bcef8c00521c315f8ac0ac04b64adb
50
py
Python
nertools/errors.py
jtourille/ner-tools
1767d0ee297b9a57cc9e079f2eb7964294274419
[ "MIT" ]
null
null
null
nertools/errors.py
jtourille/ner-tools
1767d0ee297b9a57cc9e079f2eb7964294274419
[ "MIT" ]
null
null
null
nertools/errors.py
jtourille/ner-tools
1767d0ee297b9a57cc9e079f2eb7964294274419
[ "MIT" ]
null
null
null
class LabelsNotCoherentError(Exception): pass
16.666667
40
0.8
0323afbfa95e3541501b52b764a0e2e0e7c6a476
4,796
py
Python
examples/regex_extractor.py
praekelt/feersum-nlu-api-wrappers
6580e2bab2c8a764fe868a505330b3fee6029074
[ "BSD-3-Clause" ]
9
2017-10-10T12:24:23.000Z
2021-08-18T14:07:51.000Z
examples/regex_extractor.py
praekelt/feersum-nlu-api-wrappers
6580e2bab2c8a764fe868a505330b3fee6029074
[ "BSD-3-Clause" ]
1
2020-12-06T11:03:25.000Z
2021-04-14T05:21:23.000Z
examples/regex_extractor.py
praekelt/feersum-nlu-api-wrappers
6580e2bab2c8a764fe868a505330b3fee6029074
[ "BSD-3-Clause" ]
2
2019-02-12T08:26:06.000Z
2022-02-01T09:39:47.000Z
""" Example: Shows how the RegEx entity extractor may be used. """ import urllib3 import feersum_nlu from feersum_nlu.rest import ApiException from examples import feersumnlu_host, feersum_nlu_auth_token # Configure API key authorization: APIKeyHeader configuration = feersum_nlu.Configuration() # configu...
42.442478
119
0.680776
0cce6a6bf220e7a074e3ad14eb56eb2348fb1ff1
694
py
Python
strategies/BuyAndHoldMultiple.py
webclinic017/tradebot-py
25e0500b05a56559859eccafbc73a92fc20fe5b0
[ "MIT" ]
1
2022-01-20T18:18:11.000Z
2022-01-20T18:18:11.000Z
strategies/BuyAndHoldMultiple.py
webclinic017/tradebot-py
25e0500b05a56559859eccafbc73a92fc20fe5b0
[ "MIT" ]
null
null
null
strategies/BuyAndHoldMultiple.py
webclinic017/tradebot-py
25e0500b05a56559859eccafbc73a92fc20fe5b0
[ "MIT" ]
null
null
null
from strategies.Base import BaseStrategy import math from pprint import pprint class BuyAndHoldMultiple(BaseStrategy): def next(self): for i, d in enumerate(self.datas): if d[0] > 0.0 and not self.getposition(d).size: size = math.floor(int(self.broker.get_cash() / len(self.data...
36.526316
96
0.583573
27bc1f42ab7b9ed8854a56811ab58a927176316d
824
py
Python
photo_sorter/__main__.py
liufei-go/photo_sorter-1
45eafa936c1559077b6da1625fb0bad5d879a991
[ "MIT" ]
null
null
null
photo_sorter/__main__.py
liufei-go/photo_sorter-1
45eafa936c1559077b6da1625fb0bad5d879a991
[ "MIT" ]
null
null
null
photo_sorter/__main__.py
liufei-go/photo_sorter-1
45eafa936c1559077b6da1625fb0bad5d879a991
[ "MIT" ]
null
null
null
import argparse from photo_sorter.sorting import sort def main(): parser = argparse.ArgumentParser( description="Provide the source and destination of images to organise." ) parser.add_argument("-s", "--source", required=True, help="The source folder") parser.add_argument( "-d", "--des...
24.235294
82
0.620146
25165d7d3f4273d048c8ba5a6bba7bab5a6ddbcc
320
py
Python
s019.py
Vincent0700/XiaomiOJ-Solutions
38661d62ddc79793f682cdc9aa6b52a7dfa0342a
[ "MIT" ]
null
null
null
s019.py
Vincent0700/XiaomiOJ-Solutions
38661d62ddc79793f682cdc9aa6b52a7dfa0342a
[ "MIT" ]
null
null
null
s019.py
Vincent0700/XiaomiOJ-Solutions
38661d62ddc79793f682cdc9aa6b52a7dfa0342a
[ "MIT" ]
null
null
null
import sys for line in sys.stdin: s = line.strip() if '+' in s: a, b = s.split('+') print(int(a) + int(b)) elif '>' in s: a, b = s.split('>') print('Y' if int(a) > int(b) else 'N') elif '<' in s: a, b = s.split('<') print('Y' if int(a) < int(b) else 'N')
22.857143
46
0.41875
a5048d3d60760463ea84ba6e6ba0539dda966d8b
326
py
Python
2 - Even Fibonacci numbers/solution.py
satyasahoo210/projecteuler
a04b40ed83607bdfa5ca46bd07ba25c8846d1f98
[ "MIT" ]
null
null
null
2 - Even Fibonacci numbers/solution.py
satyasahoo210/projecteuler
a04b40ed83607bdfa5ca46bd07ba25c8846d1f98
[ "MIT" ]
null
null
null
2 - Even Fibonacci numbers/solution.py
satyasahoo210/projecteuler
a04b40ed83607bdfa5ca46bd07ba25c8846d1f98
[ "MIT" ]
null
null
null
# By considering the terms in the Fibonacci sequence whose values do not exceed four million, # find the sum of the even-valued terms. def solution(limit=4000000): a,b = 0,1 sm = 0 while b < limit: a, b = b, a+b if not b & 1: sm += b return sm if __name__ == '__main__': sm = solution() prin...
19.176471
93
0.628834
91fbbaa2ba6d6726cff9ac3b7bfbc2e5d422fc78
3,570
py
Python
ceilometer/tests/db.py
lexxito/monitoring
bec8dfb8d3610331c7ae5ec543e0b8da0948c164
[ "Apache-2.0" ]
1
2016-04-15T17:14:59.000Z
2016-04-15T17:14:59.000Z
ceilometer/tests/db.py
lexxito/monitoring
bec8dfb8d3610331c7ae5ec543e0b8da0948c164
[ "Apache-2.0" ]
null
null
null
ceilometer/tests/db.py
lexxito/monitoring
bec8dfb8d3610331c7ae5ec543e0b8da0948c164
[ "Apache-2.0" ]
null
null
null
# -*- encoding: utf-8 -*- # # Copyright © 2012 New Dream Network, LLC (DreamHost) # Copyright © 2013 eNovance # # Author: Doug Hellmann <doug.hellmann@dreamhost.com> # Julien Danjou <julien@danjou.info> # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in com...
33.679245
75
0.651541
91437ca9d9508b2240a195093ae732837867e6d5
1,485
py
Python
spark_lineage/LineagerWrapper.py
Baraldo/spark-lineage
e9f567da80b6734d6a549f061f0529bb2b57dae8
[ "Apache-2.0" ]
null
null
null
spark_lineage/LineagerWrapper.py
Baraldo/spark-lineage
e9f567da80b6734d6a549f061f0529bb2b57dae8
[ "Apache-2.0" ]
null
null
null
spark_lineage/LineagerWrapper.py
Baraldo/spark-lineage
e9f567da80b6734d6a549f061f0529bb2b57dae8
[ "Apache-2.0" ]
null
null
null
from pyspark.sql import DataFrame from typing import Callable import spark_lineage from spark_lineage.Exceptions import LinageException class LineageWrapper: func: Callable description: str dataframe: DataFrame lineage: list def __init__(self, func, description, *args, **kwargs): ...
33
81
0.602694
58f88dd45bb9c614caadc301397891bfc7de1652
5,067
py
Python
deps/build.py
fizx/v8go
ef77cadc35510dd2625bf2dacf851f3fecf3d1ea
[ "BSD-3-Clause" ]
null
null
null
deps/build.py
fizx/v8go
ef77cadc35510dd2625bf2dacf851f3fecf3d1ea
[ "BSD-3-Clause" ]
2
2021-11-17T17:36:17.000Z
2021-11-17T19:52:07.000Z
deps/build.py
fizx/v8go
ef77cadc35510dd2625bf2dacf851f3fecf3d1ea
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python import platform import os import subprocess import shutil import argparse valid_archs = ['arm64', 'x86_64'] # "x86_64" is called "amd64" on Windows current_arch = platform.uname()[4].lower().replace("amd64", "x86_64") default_arch = current_arch if current_arch in valid_archs else None parser = ...
33.117647
94
0.638642
f5bd73ac3206597999475f2a4958835f2d7b1dda
9,485
py
Python
gg_custom/gg_custom/doctype/shipping_order/shipping_order.py
libermatic/gg_custom
3aa14165dc19cccedb651adb196f06882fc123e4
[ "MIT" ]
1
2021-07-07T12:43:15.000Z
2021-07-07T12:43:15.000Z
gg_custom/gg_custom/doctype/shipping_order/shipping_order.py
libermatic/gg_custom
3aa14165dc19cccedb651adb196f06882fc123e4
[ "MIT" ]
null
null
null
gg_custom/gg_custom/doctype/shipping_order/shipping_order.py
libermatic/gg_custom
3aa14165dc19cccedb651adb196f06882fc123e4
[ "MIT" ]
1
2021-07-07T12:43:15.000Z
2021-07-07T12:43:15.000Z
# -*- coding: utf-8 -*- # pylint:disable=no-member # Copyright (c) 2020, Libermatic and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document from toolz.curried import ( unique, pluck, merge, keyfi...
31.722408
101
0.521455
13e325208f2093710269765bca80b4bb6ecafb45
4,060
py
Python
text_model.py
ForbiddenDevil/tirg
7207703c209ad15c2cd9ad608f19d43c22ae868d
[ "Apache-2.0" ]
1
2021-01-14T18:25:24.000Z
2021-01-14T18:25:24.000Z
text_model.py
ForbiddenDevil/tirg
7207703c209ad15c2cd9ad608f19d43c22ae868d
[ "Apache-2.0" ]
null
null
null
text_model.py
ForbiddenDevil/tirg
7207703c209ad15c2cd9ad608f19d43c22ae868d
[ "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 agree...
32.48
119
0.665764
28ded1044ba815a2e910f7d5921faae2a39530c1
681
py
Python
setup.py
not4juu/SmartMirror
61618bcfdbcc67d7703bb501a31e9e0d247ced90
[ "MIT" ]
null
null
null
setup.py
not4juu/SmartMirror
61618bcfdbcc67d7703bb501a31e9e0d247ced90
[ "MIT" ]
6
2021-03-18T21:17:37.000Z
2022-03-11T23:32:24.000Z
setup.py
not4juu/SmartMirror
61618bcfdbcc67d7703bb501a31e9e0d247ced90
[ "MIT" ]
1
2019-08-25T10:01:52.000Z
2019-08-25T10:01:52.000Z
from setuptools import setup from sys import version, exit if version < '3.3.0': print("THIS MODULE REQUIRES PYTHON 3.3.0 > YOU ARE CURRENTLY USING PYTHON {0}".format(version)) exit(1) with open('requirements.txt') as file: install_requires = file.read().strip().split('\n') setup( name='SmartMirror',...
29.608696
99
0.684288
a83f7f96cce5c2e8df9c7bac8b609c84708913b3
5,211
py
Python
forte/processors/vocabulary_processor.py
tcl326/forte
d0d7b8b97da5e1d507dfa7cd4ec51d96067770b8
[ "Apache-2.0" ]
null
null
null
forte/processors/vocabulary_processor.py
tcl326/forte
d0d7b8b97da5e1d507dfa7cd4ec51d96067770b8
[ "Apache-2.0" ]
13
2019-12-01T04:51:38.000Z
2020-02-11T23:55:11.000Z
forte/processors/vocabulary_processor.py
tcl326/forte
d0d7b8b97da5e1d507dfa7cd4ec51d96067770b8
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 The Forte Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
29.777143
78
0.608137
90e832054701e8725b074cb3e3472ba23cda5532
3,328
py
Python
legacy/calibration/bayesian_calibrator/calibration_gaussian_emulator.py
AlexJew/CityEnergyAnalyst
6eb372c79e5100a2d0abce78561ae368fb409cd1
[ "MIT" ]
1
2018-08-16T14:34:23.000Z
2018-08-16T14:34:23.000Z
legacy/calibration/bayesian_calibrator/calibration_gaussian_emulator.py
AlexJew/CityEnergyAnalyst
6eb372c79e5100a2d0abce78561ae368fb409cd1
[ "MIT" ]
null
null
null
legacy/calibration/bayesian_calibrator/calibration_gaussian_emulator.py
AlexJew/CityEnergyAnalyst
6eb372c79e5100a2d0abce78561ae368fb409cd1
[ "MIT" ]
null
null
null
from __future__ import division from sklearn.gaussian_process import GaussianProcessRegressor from sklearn.gaussian_process.kernels import RBF, RationalQuadratic,WhiteKernel, ExpSineSquared import pickle import cea.config import cea.inputlocator from sklearn.externals import joblib # this is like the python pickle pack...
46.222222
146
0.746995
d92bbdfc48a6a41e2dc0feb5486f0752de3c750d
18,948
py
Python
src_py/hat/json/__init__.py
hat-open/hat-json
daaebc45726c34bfa3a59aa32bcfbb170d441a87
[ "Apache-2.0" ]
1
2022-02-01T13:42:19.000Z
2022-02-01T13:42:19.000Z
src_py/hat/json/__init__.py
hat-open/hat-json
daaebc45726c34bfa3a59aa32bcfbb170d441a87
[ "Apache-2.0" ]
null
null
null
src_py/hat/json/__init__.py
hat-open/hat-json
daaebc45726c34bfa3a59aa32bcfbb170d441a87
[ "Apache-2.0" ]
null
null
null
"""JSON data manipulation and validation""" import collections import enum import io import itertools import json import pathlib import typing import urllib.parse import jsonpatch import jsonschema.validators import pytomlpp import yaml from hat import util Array: typing.Type = typing.List['Data'] """JSON Array"""...
27.029957
79
0.571248
77fdb435c635e8576ea3b81af3b0f99d48d65383
63
py
Python
website/auth.py
bar2sek/bicycle-toolkit
bdace7832a8c73aa0fb4e3007a4c4d4681fd5066
[ "Unlicense" ]
null
null
null
website/auth.py
bar2sek/bicycle-toolkit
bdace7832a8c73aa0fb4e3007a4c4d4681fd5066
[ "Unlicense" ]
null
null
null
website/auth.py
bar2sek/bicycle-toolkit
bdace7832a8c73aa0fb4e3007a4c4d4681fd5066
[ "Unlicense" ]
null
null
null
from flask import Blueprint auth = Blueprint('auth', __name__)
21
34
0.777778
0e823a43b5e6f6ae64fb3a9ac4811b1454e799c2
894
py
Python
telegram_bot/__init__.py
EliseevEgor/Simple-Parser
ab0df998cf777fc04c221cd34a1cb4ecf83cb10a
[ "MIT" ]
null
null
null
telegram_bot/__init__.py
EliseevEgor/Simple-Parser
ab0df998cf777fc04c221cd34a1cb4ecf83cb10a
[ "MIT" ]
null
null
null
telegram_bot/__init__.py
EliseevEgor/Simple-Parser
ab0df998cf777fc04c221cd34a1cb4ecf83cb10a
[ "MIT" ]
null
null
null
from telegram.ext import ( Updater, CommandHandler, MessageHandler, Filters ) from telegram_bot.constants import BOT_TOKEN from telegram_bot.bot_functions import parse_info_from_yahoo, start import logging updater = Updater(token=BOT_TOKEN, use_context=True) def init_bot(): logging.basicConfig(fo...
24.833333
91
0.702461
fe5adf2f7d2d4d86321c33d4d9398016f9542f7f
8,466
py
Python
angr/engines/pcode/arch/ArchPcode_tricore_LE_32_tc172x.py
matthewpruett/angr
bfba2af1ea2eb941001339f47a1264a685c60eec
[ "BSD-2-Clause" ]
6,132
2015-08-06T23:24:47.000Z
2022-03-31T21:49:34.000Z
angr/engines/pcode/arch/ArchPcode_tricore_LE_32_tc172x.py
matthewpruett/angr
bfba2af1ea2eb941001339f47a1264a685c60eec
[ "BSD-2-Clause" ]
2,272
2015-08-10T08:40:07.000Z
2022-03-31T23:46:44.000Z
angr/engines/pcode/arch/ArchPcode_tricore_LE_32_tc172x.py
matthewpruett/angr
bfba2af1ea2eb941001339f47a1264a685c60eec
[ "BSD-2-Clause" ]
1,155
2015-08-06T23:37:39.000Z
2022-03-31T05:54:11.000Z
### ### This file was automatically generated ### from archinfo.arch import register_arch, Endness, Register from .common import ArchPcode class ArchPcode_tricore_LE_32_tc172x(ArchPcode): name = 'tricore:LE:32:tc172x' pcode_arch = 'tricore:LE:32:tc172x' description = 'Siemens Tricore Embedded Processor ...
36.969432
87
0.542877
a2daf8da0c9595b301f2778699976e3c48c189f8
2,175
py
Python
support_switch/test/test_support_switch.py
PeppaTheC/switch-case-statment
2f47efc193687517c37c684aad0f259f968272bf
[ "Unlicense" ]
null
null
null
support_switch/test/test_support_switch.py
PeppaTheC/switch-case-statment
2f47efc193687517c37c684aad0f259f968272bf
[ "Unlicense" ]
null
null
null
support_switch/test/test_support_switch.py
PeppaTheC/switch-case-statment
2f47efc193687517c37c684aad0f259f968272bf
[ "Unlicense" ]
null
null
null
import unittest from support_switch.support_switch_statement import support_switch checker = False @support_switch def user_case_simple(a, b, c): """ switch a: case b: return True case c: return False """ @support_switch def user_case_union(a, b, c): """ ...
22.42268
66
0.471724
45f6348df1e2ca05f3f58c1674ef73a8fca4fc9d
1,288
py
Python
ambari-server/src/main/resources/stacks/PERF/1.0/services/FAKEHDFS/package/scripts/zkfc_slave.py
likenamehaojie/Apache-Ambari-ZH
5973025bd694cdbb4b49fb4c4e0d774782811ff6
[ "Apache-2.0" ]
25
2019-12-04T03:09:55.000Z
2022-03-08T10:52:06.000Z
ambari-server/src/main/resources/stacks/PERF/1.0/services/FAKEHDFS/package/scripts/zkfc_slave.py
likenamehaojie/Apache-Ambari-ZH
5973025bd694cdbb4b49fb4c4e0d774782811ff6
[ "Apache-2.0" ]
29
2019-12-04T03:00:39.000Z
2022-03-02T06:25:44.000Z
ambari-server/src/main/resources/stacks/PERF/1.0/services/FAKEHDFS/package/scripts/zkfc_slave.py
likenamehaojie/Apache-Ambari-ZH
5973025bd694cdbb4b49fb4c4e0d774782811ff6
[ "Apache-2.0" ]
33
2019-12-04T02:51:30.000Z
2022-03-24T02:47:38.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 use this ...
29.272727
72
0.764752
40e5fab08c35b7c1ba54ed7bef1485d5da1bfd00
1,049
py
Python
autodisc/autodisc/representations/functionrepresentation.py
flowersteam/automated_discovery_of_lenia_patterns
97cc7cde2120fa95225d1e470e00b8aa8c034e97
[ "MIT" ]
10
2019-10-05T16:22:11.000Z
2021-12-30T14:09:42.000Z
autodisc/autodisc/representations/functionrepresentation.py
flowersteam/automated_discovery_of_lenia_patterns
97cc7cde2120fa95225d1e470e00b8aa8c034e97
[ "MIT" ]
null
null
null
autodisc/autodisc/representations/functionrepresentation.py
flowersteam/automated_discovery_of_lenia_patterns
97cc7cde2120fa95225d1e470e00b8aa8c034e97
[ "MIT" ]
2
2019-10-14T12:12:38.000Z
2020-09-16T11:18:26.000Z
import autodisc as ad import importlib class FunctionRepresentation(ad.core.Representation): @staticmethod def default_config(): default_config = ad.core.Representation.default_config() default_config.function = None #default_config.config : if defined then this is given to the functi...
29.971429
97
0.657769
18e3bc8bcd3b6418ab37e5a859bf03720e725bc7
2,572
py
Python
pages/migrations/0006_onboardingrecord_onboardingscreen.py
yellowjaguar5/lnldb
dea7708f5e4e103ef6ef968c9f3a4deaa58861c5
[ "MIT" ]
5
2017-09-25T21:24:59.000Z
2021-12-18T17:08:13.000Z
pages/migrations/0006_onboardingrecord_onboardingscreen.py
yellowjaguar5/lnldb
dea7708f5e4e103ef6ef968c9f3a4deaa58861c5
[ "MIT" ]
304
2015-03-24T17:44:22.000Z
2022-03-29T14:09:41.000Z
pages/migrations/0006_onboardingrecord_onboardingscreen.py
yellowjaguar5/lnldb
dea7708f5e4e103ef6ef968c9f3a4deaa58861c5
[ "MIT" ]
10
2017-10-24T02:18:12.000Z
2021-09-20T20:40:25.000Z
# Generated by Django 3.1.6 on 2021-02-18 06:22 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('auth', '0012_alter_user_...
58.454545
211
0.644246
1c48b4ff77f16456c4d2ccbf2ebf5ccef234b70c
9,572
py
Python
disent/frameworks/vae/_unsupervised__infovae.py
neonkitchen/disent
0f45fefea03473690dfdbf48ef83f6e17ca9b8b3
[ "MIT" ]
null
null
null
disent/frameworks/vae/_unsupervised__infovae.py
neonkitchen/disent
0f45fefea03473690dfdbf48ef83f6e17ca9b8b3
[ "MIT" ]
null
null
null
disent/frameworks/vae/_unsupervised__infovae.py
neonkitchen/disent
0f45fefea03473690dfdbf48ef83f6e17ca9b8b3
[ "MIT" ]
1
2022-01-18T06:43:33.000Z
2022-01-18T06:43:33.000Z
# ~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ # MIT License # # Copyright (c) 2021 Nathan Juraj Michlo # # 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 Softwar...
45.364929
127
0.573234
4ba2e0f687054ecf698e595e9e1fb30ccf6e685c
212,330
py
Python
pysnmp-with-texts/Nortel-MsCarrier-MscPassport-AtmUniMIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
8
2019-05-09T17:04:00.000Z
2021-06-09T06:50:51.000Z
pysnmp-with-texts/Nortel-MsCarrier-MscPassport-AtmUniMIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
4
2019-05-31T16:42:59.000Z
2020-01-31T21:57:17.000Z
pysnmp-with-texts/Nortel-MsCarrier-MscPassport-AtmUniMIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module Nortel-MsCarrier-MscPassport-AtmUniMIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/Nortel-MsCarrier-MscPassport-AtmUniMIB # Produced by pysmi-0.3.4 at Wed May 1 14:29:08 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4...
208.98622
15,752
0.81054
be4d532d5cce92522f615458a957722add6b0167
61,458
py
Python
ophyd/device.py
mattclarke/ophyd
ffa67739f850f70f3bff9be9df30e9046f29534e
[ "BSD-3-Clause" ]
null
null
null
ophyd/device.py
mattclarke/ophyd
ffa67739f850f70f3bff9be9df30e9046f29534e
[ "BSD-3-Clause" ]
null
null
null
ophyd/device.py
mattclarke/ophyd
ffa67739f850f70f3bff9be9df30e9046f29534e
[ "BSD-3-Clause" ]
null
null
null
import collections import contextlib import functools import inspect import itertools import logging import operator import textwrap import time as ttime import warnings from enum import Enum from collections import (OrderedDict, namedtuple) from .ophydobj import OphydObject, Kind from .signal import Signal from .sta...
37.337789
88
0.598718
34f9d1e428129e07fd0870e7a59bd43e64e492ca
1,065
py
Python
PyProjects/Side_Scripts/Maze_Solver.py
srwagsta/Side_Scripts
fffaa66040cc16e85187f52ac675abb6391c30a0
[ "Apache-2.0" ]
null
null
null
PyProjects/Side_Scripts/Maze_Solver.py
srwagsta/Side_Scripts
fffaa66040cc16e85187f52ac675abb6391c30a0
[ "Apache-2.0" ]
null
null
null
PyProjects/Side_Scripts/Maze_Solver.py
srwagsta/Side_Scripts
fffaa66040cc16e85187f52ac675abb6391c30a0
[ "Apache-2.0" ]
null
null
null
GOAL = (9, 9) MAZE_DEMINSION = 10 def set_maze(MAZE_DEMINSION): # use this function to create a square grid and set the open squares pass def open(x, y): # Return if the location is movable pass def find_path(start_x, start_y): current_loc = (start_x, start_y) solution_path = current_loc ...
32.272727
72
0.661972
8e4215f5c3b9d574c92480bc9ed5795e420443b6
201
py
Python
example.py
NailLegProcessorDivide/JSON-Parser
c06db69376b74108c6989282d6da14f56ad29e8f
[ "MIT" ]
null
null
null
example.py
NailLegProcessorDivide/JSON-Parser
c06db69376b74108c6989282d6da14f56ad29e8f
[ "MIT" ]
null
null
null
example.py
NailLegProcessorDivide/JSON-Parser
c06db69376b74108c6989282d6da14f56ad29e8f
[ "MIT" ]
null
null
null
import jsonpars myParser = jsonpars.getValueMatcher() result = myParser.match("{\"name\": \"john\", \"age\" : 25}")[1].value print(result) print("age:", result["age"]) print("name:", result["name"])
22.333333
70
0.646766
673fe7a1a2afc3b12442680fc8609c43acddc0b8
1,504
py
Python
flask/static/Database.py
tlee753/cellside-assistance
b6dbf762a07048b36c7719a0688b0291a38bc4ec
[ "Apache-2.0" ]
null
null
null
flask/static/Database.py
tlee753/cellside-assistance
b6dbf762a07048b36c7719a0688b0291a38bc4ec
[ "Apache-2.0" ]
null
null
null
flask/static/Database.py
tlee753/cellside-assistance
b6dbf762a07048b36c7719a0688b0291a38bc4ec
[ "Apache-2.0" ]
null
null
null
from pymongo import MongoClient from bson import ObjectId import json # Database connection information host = 'localhost' port = 27017 dbName = 'cellsideAssistance' class JSONEncoder(json.JSONEncoder): def default(self, o): if isinstance(o, ObjectId): return str(o) return json.JSONEnc...
30.693878
89
0.683511
42a71109d2a2ef6b66cc7958978877137a6d2782
4,409
py
Python
asposetaskscloud/models/calendar_exceptions_response.py
aspose-tasks-cloud/aspose-tasks-cloud-python
d1852a02fb1aa2591501a34d5e56079f8aac43f0
[ "MIT" ]
2
2021-08-16T09:25:51.000Z
2022-01-27T20:20:41.000Z
asposetaskscloud/models/calendar_exceptions_response.py
aspose-tasks-cloud/aspose-tasks-cloud-python
d1852a02fb1aa2591501a34d5e56079f8aac43f0
[ "MIT" ]
null
null
null
asposetaskscloud/models/calendar_exceptions_response.py
aspose-tasks-cloud/aspose-tasks-cloud-python
d1852a02fb1aa2591501a34d5e56079f8aac43f0
[ "MIT" ]
null
null
null
# coding: utf-8 # ----------------------------------------------------------------------------------- # <copyright company="Aspose" file="CalendarExceptionsResponse.py"> # Copyright (c) 2020 Aspose.Tasks Cloud # </copyright> # <summary> # Permission is hereby granted, free of charge, to any person obtaining a copy ...
36.438017
109
0.619642
e7121e551d7665d8cd5ab113836b3709e6362532
1,250
py
Python
kolejka/judge/typing.py
Raalsky/kolejka-judge
4fa42d9b9a52a94cd8dc57a99218b32d0e8fc18f
[ "MIT" ]
2
2020-10-29T11:00:03.000Z
2021-03-08T19:27:58.000Z
kolejka/judge/typing.py
kolejka/kolejka-judge
72dee578c6326d35c453cbb1128e592878b85ded
[ "MIT" ]
1
2021-09-01T08:10:35.000Z
2021-09-01T10:09:57.000Z
kolejka/judge/typing.py
Raalsky/kolejka-judge
4fa42d9b9a52a94cd8dc57a99218b32d0e8fc18f
[ "MIT" ]
1
2021-10-08T19:32:09.000Z
2021-10-08T19:32:09.000Z
# vim:ts=4:sts=4:sw=4:expandtab from collections import OrderedDict from copy import deepcopy from kolejka.judge import config __all__ = [ 'AbstractCommand', 'AbstractTask', 'AbstractSystem', 'AbstractLimits', 'AbstractResult', 'AbstractPath', 'default_kwargs', 'nononedict', ] def __dir__(): return __all__ ...
19.53125
150
0.6056
933c15ebc74a6028c407d875dc743412fc9affd0
214
py
Python
WarioEditor/toolkits/default/intOut.py
McMasterRS/WARIO-Editor
49156de97497e8457eb8a924256118a8f7fb5597
[ "MIT" ]
1
2020-09-05T05:45:14.000Z
2020-09-05T05:45:14.000Z
WarioEditor/toolkits/default/intOut.py
McMasterRS/WARIO-Editor
49156de97497e8457eb8a924256118a8f7fb5597
[ "MIT" ]
null
null
null
WarioEditor/toolkits/default/intOut.py
McMasterRS/WARIO-Editor
49156de97497e8457eb8a924256118a8f7fb5597
[ "MIT" ]
null
null
null
from wario import Node class intOut(Node): def __init__(self, name): super(intOut, self).__init__(name) def process(self): print("Float: ", self.args["In"]) return self.args["In"]
21.4
42
0.607477
5a7b7a4fc4f076f26091523507890cd084dc7418
10,629
py
Python
dgp/utils/visualization.py
wayveai/dgp
cebddc4847d3a71426459db5864ee9c256b7be9a
[ "MIT" ]
null
null
null
dgp/utils/visualization.py
wayveai/dgp
cebddc4847d3a71426459db5864ee9c256b7be9a
[ "MIT" ]
null
null
null
dgp/utils/visualization.py
wayveai/dgp
cebddc4847d3a71426459db5864ee9c256b7be9a
[ "MIT" ]
null
null
null
# Copyright 2019 Toyota Research Institute. All rights reserved. """Visualization tools for a variety of tasks""" import numpy as np from matplotlib.cm import get_cmap import cv2 from dgp.utils.camera import Camera COLOR_RED = (255, 0, 0) COLOR_GREEN = (0, 255, 0) COLOR_BLUE = (0, 0, 255) COLOR_GRAY = (100, 100, 100...
36.400685
125
0.616333
f996c92f0ff23ca18aeb1e22a2c9a5c2983020d6
617
py
Python
2020/06/solution1.py
mitchellrj/adventofcode
e7a55d59a51292218b8849a7428fa32bd0371727
[ "WTFPL" ]
null
null
null
2020/06/solution1.py
mitchellrj/adventofcode
e7a55d59a51292218b8849a7428fa32bd0371727
[ "WTFPL" ]
null
null
null
2020/06/solution1.py
mitchellrj/adventofcode
e7a55d59a51292218b8849a7428fa32bd0371727
[ "WTFPL" ]
null
null
null
import sys import time def main(union_group_yesses): return sum(map(len, union_group_yesses)) def reader(fh): yesses = set() for l in fh: l = l.strip() if not l: yield yesses yesses = set() yesses = yesses | set(l) yield yesses if __name__ == '__mai...
19.903226
92
0.58671
8f1e638d31c0017888170ef93c60ad9b3ddf85c9
2,451
py
Python
GENTRL/gentrl/dataloader.py
bbueno5000/GENTRL_Demo
6ac1d13f0bdd7cb0cf7d9453ebab1b461e09eddf
[ "MIT" ]
1
2022-01-07T13:39:10.000Z
2022-01-07T13:39:10.000Z
progentrl/dataloader.py
christofer-f/proGENTRL
c48305c3411ecb604c4f26f5e6b62f285e42e696
[ "MIT" ]
null
null
null
progentrl/dataloader.py
christofer-f/proGENTRL
c48305c3411ecb604c4f26f5e6b62f285e42e696
[ "MIT" ]
2
2020-03-19T04:49:14.000Z
2020-07-27T05:51:50.000Z
import torch from torch.utils.data import Dataset import pandas as pd import numpy as np class MolecularDataset(Dataset): def __init__(self, sources=[], props=['logIC50', 'BFL', 'pipeline'], with_missings=False): self.num_sources = len(sources) self.source_smiles = [] s...
33.121622
74
0.538964
12216e5c64bbe4b8440706ae3466a021e5e1dbe4
88,741
py
Python
jax/core.py
usalko/jax
02b99097b2aa06ba50fb9426b1da6d8321155cf6
[ "Apache-2.0" ]
null
null
null
jax/core.py
usalko/jax
02b99097b2aa06ba50fb9426b1da6d8321155cf6
[ "Apache-2.0" ]
null
null
null
jax/core.py
usalko/jax
02b99097b2aa06ba50fb9426b1da6d8321155cf6
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
35.075494
116
0.69447
7b984462a6fad115bc20f5b19f7a53308edf82fe
1,057
py
Python
setup.py
pmelchior/skymapper
5aab14ab4dde61cb4368495f4f9a837f3b62eeae
[ "MIT" ]
35
2016-03-14T20:15:42.000Z
2022-02-02T13:53:52.000Z
setup.py
pmelchior/skymapper
5aab14ab4dde61cb4368495f4f9a837f3b62eeae
[ "MIT" ]
23
2016-03-14T22:54:01.000Z
2020-03-26T03:39:02.000Z
setup.py
pmelchior/skymapper
5aab14ab4dde61cb4368495f4f9a837f3b62eeae
[ "MIT" ]
12
2016-03-14T20:59:54.000Z
2021-05-11T21:45:34.000Z
from setuptools import setup long_description = open('README.md').read() setup( name="skymapper", description="Mapping astronomical survey data on the sky, handsomely", long_description=long_description, long_description_content_type='text/markdown', version="0.4.2", license="MIT", author=...
35.233333
74
0.655629
5861408175f936c191949779241f7f22319b1541
1,701
py
Python
watchman/integration/test_invalid_expr.py
istiak101/watchman
8bede2333411b4cafc43c08ed21866dc100f3bd2
[ "MIT" ]
1
2022-03-04T14:09:05.000Z
2022-03-04T14:09:05.000Z
watchman/integration/test_invalid_expr.py
Siyabonga-Gregory/watchman
4c2a9ee8bc01f16be5be81c6734c0a00f8548770
[ "MIT" ]
null
null
null
watchman/integration/test_invalid_expr.py
Siyabonga-Gregory/watchman
4c2a9ee8bc01f16be5be81c6734c0a00f8548770
[ "MIT" ]
null
null
null
# vim:ts=4:sw=4:et: # Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import pywatchman from watchman.integration.lib import WatchmanTestCase @WatchmanTestCase.expand_matrix class TestInv...
29.842105
80
0.542622
353bb0a82fbe14f2c14ac26aa88ae778868cca32
1,627
py
Python
passthon/passthon.py
fckingadrien/passthon
4e16c6518b2a21a67f4087bb94179bbe1556f3fc
[ "MIT" ]
null
null
null
passthon/passthon.py
fckingadrien/passthon
4e16c6518b2a21a67f4087bb94179bbe1556f3fc
[ "MIT" ]
null
null
null
passthon/passthon.py
fckingadrien/passthon
4e16c6518b2a21a67f4087bb94179bbe1556f3fc
[ "MIT" ]
null
null
null
# passthon 0.0.1 # By Adrián Fernández # This library is still under development, excuse the mistakes! class password(): password = '' # for a single password. Empty by default. passwords = [] # for multiple passwords. Empty by default. def __init__(self, length, lc=True, uc=False, n...
31.901961
90
0.562999
04a67ebc35b4f07f80f0f7f2893f69b1c95e51a4
721
py
Python
pvapy/pvaPyProblem.py
mrkraimer/testPvaPy
7d09095bc76bf0a86d8d664c85757ab8369485c8
[ "MIT" ]
null
null
null
pvapy/pvaPyProblem.py
mrkraimer/testPvaPy
7d09095bc76bf0a86d8d664c85757ab8369485c8
[ "MIT" ]
1
2020-07-18T19:50:51.000Z
2020-07-19T09:58:16.000Z
pvapy/pvaPyProblem.py
mrkraimer/testPvaPy
7d09095bc76bf0a86d8d664c85757ab8369485c8
[ "MIT" ]
2
2020-07-18T18:06:57.000Z
2020-09-10T06:40:34.000Z
from pvapy import Channel, CA, PvTimeStamp, PvAlarm print('DBRdouble') channel = Channel('DBRdouble') timestamp = PvTimeStamp(10, 100) alarm = PvAlarm(1,1,"mess") print(channel.get('value')) print('here 1') channel.put(alarm,'record[process=false]field(alarm)') print('here 2') print(channel.get('value')) channel.put(ti...
27.730769
62
0.736477
9e10bb9700c3b1ca49e99f5c08f8c1f9ae30051b
4,084
py
Python
travis_pypi_setup.py
vilkasgroup/epages_client
10e63d957ee45dc5d4df741064806f724fb1be1f
[ "MIT" ]
3
2018-01-26T13:44:26.000Z
2020-05-13T13:58:19.000Z
travis_pypi_setup.py
vilkasgroup/epages_client
10e63d957ee45dc5d4df741064806f724fb1be1f
[ "MIT" ]
53
2018-02-05T10:59:22.000Z
2022-01-01T19:31:08.000Z
travis_pypi_setup.py
vilkasgroup/epages_client
10e63d957ee45dc5d4df741064806f724fb1be1f
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """Update encrypted deploy password in Travis config file.""" from __future__ import print_function import base64 import json import os from getpass import getpass import yaml from cryptography.hazmat.primitives.serialization import load_pem_public_key from cryptography.h...
31.90625
79
0.701273
52b571c443a342001b5471d11c3f3a8aa76f2e92
9,618
py
Python
src/beanmachine/ppl/inference/compositional_infer.py
feynmanliang/beanmachine
5dea2b9f6387f2f7fd1e53b0915a1b8405f2b46b
[ "MIT" ]
177
2021-12-12T14:19:05.000Z
2022-03-24T05:48:10.000Z
src/beanmachine/ppl/inference/compositional_infer.py
feynmanliang/beanmachine
5dea2b9f6387f2f7fd1e53b0915a1b8405f2b46b
[ "MIT" ]
171
2021-12-11T06:12:05.000Z
2022-03-31T20:26:29.000Z
src/beanmachine/ppl/inference/compositional_infer.py
facebookresearch/beanmachine
225114d9964b90c3a49adddc4387b4a47d1b4262
[ "MIT" ]
31
2021-12-11T06:27:19.000Z
2022-03-25T13:31:56.000Z
# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import inspect from collections import defaultdict from typing import ( Callable, cast, Dict, List, Optional, Set, ...
39.418033
95
0.644417
dac8286da668f979d5b91d6b317091f45337f246
3,828
py
Python
_exclude/metadata_generator.py
folsomde/folsomde.github.io
aad0fab3d1aae5082fc656978f889d2ee67dec64
[ "MIT" ]
null
null
null
_exclude/metadata_generator.py
folsomde/folsomde.github.io
aad0fab3d1aae5082fc656978f889d2ee67dec64
[ "MIT" ]
null
null
null
_exclude/metadata_generator.py
folsomde/folsomde.github.io
aad0fab3d1aae5082fc656978f889d2ee67dec64
[ "MIT" ]
null
null
null
import numpy as np f = np.load("metadata.npz",allow_pickle=True) metadata = f['metadata'][()] topics = {'M': ['Central Force Motion', 'Normal Modes', 'Oscillations', 'Lagrangian Mechanics', 'Classical Scattering', 'Continuous Media', 'Fluid Mechanics', 'Rigid Body Motion', 'Rolling Constraints', 'Friction', ...
34.8
118
0.6907
adb306f64738cf8154e777c9602519963dc3055d
6,526
py
Python
scripts/admin_clean_provider_machine.py
profesormig/quimica3a
a453f0d7485ebc4b2d7b06a72b44c6c179a3bbd4
[ "BSD-3-Clause" ]
null
null
null
scripts/admin_clean_provider_machine.py
profesormig/quimica3a
a453f0d7485ebc4b2d7b06a72b44c6c179a3bbd4
[ "BSD-3-Clause" ]
null
null
null
scripts/admin_clean_provider_machine.py
profesormig/quimica3a
a453f0d7485ebc4b2d7b06a72b44c6c179a3bbd4
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python import argparse import subprocess import logging from django.utils.timezone import datetime, utc from service.driver import get_account_driver from core.models import Provider, ProviderMachine, Identity, MachineRequest, Application, ProviderMachine from core.models.application import _generate_ap...
44.094595
132
0.682654
8acce4c9d5a477af45d0075f33c34a4a42429e5c
15,870
py
Python
daemon/core/gui/graph/manager.py
ruohonej/core
31e6839ac5a9a5e2b1d8840e32b9ad1f5b2606a1
[ "BSD-2-Clause" ]
1
2022-02-12T06:34:49.000Z
2022-02-12T06:34:49.000Z
daemon/core/gui/graph/manager.py
kestasjk/core
31e6839ac5a9a5e2b1d8840e32b9ad1f5b2606a1
[ "BSD-2-Clause" ]
null
null
null
daemon/core/gui/graph/manager.py
kestasjk/core
31e6839ac5a9a5e2b1d8840e32b9ad1f5b2606a1
[ "BSD-2-Clause" ]
null
null
null
import json import logging import tkinter as tk from copy import deepcopy from tkinter import BooleanVar, messagebox, ttk from typing import TYPE_CHECKING, Any, Dict, Optional, Tuple, ValuesView from core.api.grpc.wrappers import Link, LinkType, Node, Session, ThroughputsEvent from core.gui import nodeutils as nutils ...
36.65127
87
0.628544
fd83c8ae25e7ca4b203e97d263998d8780c45134
3,044
py
Python
tests/test_pod.py
mtezzele/EZyRB
30e6db72d444a3a1713f0af63ceb0585350a7ecf
[ "MIT" ]
39
2016-06-30T08:21:47.000Z
2022-03-18T16:05:30.000Z
tests/test_pod.py
mtezzele/EZyRB
30e6db72d444a3a1713f0af63ceb0585350a7ecf
[ "MIT" ]
38
2016-09-21T08:45:27.000Z
2022-03-07T13:48:59.000Z
tests/test_pod.py
mtezzele/EZyRB
30e6db72d444a3a1713f0af63ceb0585350a7ecf
[ "MIT" ]
47
2016-05-20T12:44:39.000Z
2022-03-05T05:01:19.000Z
import numpy as np from unittest import TestCase from ezyrb import POD snapshots = np.load('tests/test_datasets/p_snapshots.npy').T poddb = np.load('tests/test_datasets/p_snapshots_pod.npy') modes = np.load('tests/test_datasets/p_snapshots_pod_modes.npy') class TestPOD(TestCase): def test_constructor_empty(self...
33.086957
78
0.651445
efdf57e0b19b73948da00acd7138607dae647ac6
10,796
py
Python
src/pip/_internal/cli/parser.py
lhchavez/pip
bd5ac261c0bf4c9a37322b2cfe1b2564479f56ad
[ "MIT" ]
2
2021-11-11T10:44:41.000Z
2022-03-29T17:18:30.000Z
src/pip/_internal/cli/parser.py
illia-v/pip
76cd70ac42cbbe6a51d83bd100f500ac4c21f26b
[ "MIT" ]
3
2021-12-16T17:05:16.000Z
2022-03-14T21:51:36.000Z
src/pip/_internal/cli/parser.py
illia-v/pip
76cd70ac42cbbe6a51d83bd100f500ac4c21f26b
[ "MIT" ]
1
2021-06-29T14:58:22.000Z
2021-06-29T14:58:22.000Z
"""Base option parser setup""" import logging import optparse import shutil import sys import textwrap from contextlib import suppress from typing import Any, Dict, Iterator, List, Tuple from pip._internal.cli.status_codes import UNKNOWN_ERROR from pip._internal.configuration import Configuration, ConfigurationError ...
36.846416
85
0.5892
c298bc32058382d9b19d0c00958a9e1c98b7b387
586
py
Python
authentication/forms.py
mzazakeith/uber-clone
02f0be423681be5517182b278176feede1126b7a
[ "MIT" ]
1
2022-01-13T19:31:56.000Z
2022-01-13T19:31:56.000Z
authentication/forms.py
mzazakeith/uber-clone
02f0be423681be5517182b278176feede1126b7a
[ "MIT" ]
5
2020-02-12T01:28:33.000Z
2021-06-10T20:44:23.000Z
authentication/forms.py
mzazakeith/uber-clone
02f0be423681be5517182b278176feede1126b7a
[ "MIT" ]
null
null
null
from django import forms from django.contrib.auth.forms import UserCreationForm from django.contrib.auth import get_user_model User = get_user_model() class DriverSignupForm(UserCreationForm): email = forms.EmailField(max_length=200, help_text='Required') class Meta: model = User fields = ('...
23.44
66
0.708191
d7028870f49bd8687b11c866426e8e56e40aeb09
28,576
py
Python
frappe/model/base_document.py
neelbhanushali/frappe
7bbf4ef7db581b3b6759726e4e49776d61511a4e
[ "MIT" ]
null
null
null
frappe/model/base_document.py
neelbhanushali/frappe
7bbf4ef7db581b3b6759726e4e49776d61511a4e
[ "MIT" ]
4
2020-12-04T21:06:17.000Z
2022-03-12T00:39:08.000Z
frappe/model/base_document.py
neelbhanushali/frappe
7bbf4ef7db581b3b6759726e4e49776d61511a4e
[ "MIT" ]
null
null
null
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals from six import iteritems, string_types import frappe import datetime from frappe import _ from frappe.model import default_fields, table_fields from frappe.model.naming import s...
31.230601
121
0.695409
bbedc6af954ead410f05e506106556e7c449e1f7
2,763
py
Python
meter.py
DSSR2/Simple-Semantic-Segmentation
5cb13228b3dd05ca037db49094b3f73525ee9949
[ "MIT" ]
1
2022-01-05T18:33:13.000Z
2022-01-05T18:33:13.000Z
meter.py
DSSR2/Simple-Semantic-Segmentation
5cb13228b3dd05ca037db49094b3f73525ee9949
[ "MIT" ]
null
null
null
meter.py
DSSR2/Simple-Semantic-Segmentation
5cb13228b3dd05ca037db49094b3f73525ee9949
[ "MIT" ]
1
2020-06-22T02:54:33.000Z
2020-06-22T02:54:33.000Z
import torch import numpy as np from sklearn.metrics import f1_score, fbeta_score, precision_recall_fscore_support, accuracy_score from sklearn.metrics import jaccard_similarity_score as jaccard_score from sklearn.model_selection import train_test_split class Meter: '''A meter to keep track of iou and dice scores t...
34.5375
120
0.638798
85db092e44d31ba441f9dc88de520204a11efc4b
3,345
py
Python
user_test.py
paulmunyao/Password-Locker
918aa30ecadc1ea09cd09b2945e57e0f3ac67b7e
[ "Unlicense" ]
null
null
null
user_test.py
paulmunyao/Password-Locker
918aa30ecadc1ea09cd09b2945e57e0f3ac67b7e
[ "Unlicense" ]
null
null
null
user_test.py
paulmunyao/Password-Locker
918aa30ecadc1ea09cd09b2945e57e0f3ac67b7e
[ "Unlicense" ]
null
null
null
import unittest from user import User class TestUser(unittest.TestCase): ''' Test that defines test cases for the User class Args: unitest.Testcase: Testcase that helps in creating test cases for class User. ''' def setUp(self): ''' Set up method to run before each test c...
25.930233
87
0.569507
00811c2e811557ad4839a8705946e9f863dad596
788
py
Python
src/gui/migrations/0005_auto_20190808_1645.py
digitalfabrik/ish-goalkeeper
a500c7a628ef66897941dadc0addb0be01658e02
[ "MIT" ]
12
2021-10-30T12:57:26.000Z
2021-10-31T11:33:20.000Z
src/gui/migrations/0005_auto_20190808_1645.py
digitalfabrik/ish-goalkeeper
a500c7a628ef66897941dadc0addb0be01658e02
[ "MIT" ]
53
2019-07-31T12:44:44.000Z
2021-10-21T12:40:29.000Z
src/gui/migrations/0005_auto_20190808_1645.py
digitalfabrik/ish-goalkeeper
a500c7a628ef66897941dadc0addb0be01658e02
[ "MIT" ]
null
null
null
# Generated by Django 2.2.1 on 2019-08-08 16:45 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('gui', '0004_auto_20190808_1341'), ] operations = [ migrations.RenameField( model_name='feedback', old_name='gender_female', ...
23.878788
51
0.541878
05906aeab04e5a3df7e1bd21feffa10a22324b78
7,556
py
Python
vasnet_model.py
ombretta/VASNet
17f1e81ce499c833038e1753158361e01c8e53b5
[ "MIT" ]
null
null
null
vasnet_model.py
ombretta/VASNet
17f1e81ce499c833038e1753158361e01c8e53b5
[ "MIT" ]
null
null
null
vasnet_model.py
ombretta/VASNet
17f1e81ce499c833038e1753158361e01c8e53b5
[ "MIT" ]
null
null
null
__author__ = 'Jiri Fajtl' __email__ = 'ok1zjf@gmail.com' __version__= '3.6' __status__ = "Research" __date__ = "1/12/2018" __license__= "MIT License" import math import torch import torch.nn as nn import torch.nn.functional as F from config import * from layer_norm import * import sys sys.path.append("../../instruc...
31.22314
101
0.59595
be12e59ad579ac928c74eba40a73b47ad6749d98
132
py
Python
psyneulink/library/components/mechanisms/adaptive/control/__init__.py
bdsinger/PsyNeuLink
71d8a0bb1691ff85061d4ad3de866d9930a69a73
[ "Apache-2.0" ]
null
null
null
psyneulink/library/components/mechanisms/adaptive/control/__init__.py
bdsinger/PsyNeuLink
71d8a0bb1691ff85061d4ad3de866d9930a69a73
[ "Apache-2.0" ]
null
null
null
psyneulink/library/components/mechanisms/adaptive/control/__init__.py
bdsinger/PsyNeuLink
71d8a0bb1691ff85061d4ad3de866d9930a69a73
[ "Apache-2.0" ]
null
null
null
from . import agt from . import evc from .agt import * from .evc import * __all__ = list(agt.__all__) __all__.extend(evc.__all__)
14.666667
27
0.727273
c0ae45a3f9746f749af4e7cd37292682aac8ee0b
8,907
py
Python
mapproxy/client/wms.py
vrsource/mapproxy
7699173f26c933e4ed91750c0b53c0c916138e3f
[ "ECL-2.0", "Apache-2.0" ]
1
2018-11-10T21:11:54.000Z
2018-11-10T21:11:54.000Z
mapproxy/client/wms.py
vrsource/mapproxy
7699173f26c933e4ed91750c0b53c0c916138e3f
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
mapproxy/client/wms.py
vrsource/mapproxy
7699173f26c933e4ed91750c0b53c0c916138e3f
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# This file is part of the MapProxy project. # Copyright (C) 2010 Omniscale <http://omniscale.de> # # 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...
38.392241
95
0.653419
2e9d0a27d6e7d1bffa710be2620ea95c1d257069
1,117
py
Python
app/main/gpt2/download_model.py
capriciousduck/gpt2-app
f6b855c28dbd3cecc5b17a9d0f0b00425bd5a47f
[ "MIT" ]
33
2019-04-26T08:21:08.000Z
2021-11-21T06:32:22.000Z
app/main/gpt2/download_model.py
capriciousduck/gpt2-app
f6b855c28dbd3cecc5b17a9d0f0b00425bd5a47f
[ "MIT" ]
null
null
null
app/main/gpt2/download_model.py
capriciousduck/gpt2-app
f6b855c28dbd3cecc5b17a9d0f0b00425bd5a47f
[ "MIT" ]
16
2019-07-09T12:38:59.000Z
2021-04-24T12:44:09.000Z
import os import sys import requests from tqdm import tqdm basedir = os.path.dirname(os.path.abspath(__file__)) if len(sys.argv) != 2: print('You must enter the model name as a parameter, e.g.: download_model.py 117M') sys.exit(1) model = sys.argv[1] subdir = os.path.join('models', model) subdir_abs = os.pa...
36.032258
146
0.672337
3d69dca2335f46b85b8c69339a28d41a7d50df94
56,136
py
Python
Wrapping/Generators/Python/itk/support/itkExtras.py
al-sabr/ITK
deb4f26249f7254964ac823d47dfb3592f77c9ea
[ "Apache-2.0" ]
null
null
null
Wrapping/Generators/Python/itk/support/itkExtras.py
al-sabr/ITK
deb4f26249f7254964ac823d47dfb3592f77c9ea
[ "Apache-2.0" ]
null
null
null
Wrapping/Generators/Python/itk/support/itkExtras.py
al-sabr/ITK
deb4f26249f7254964ac823d47dfb3592f77c9ea
[ "Apache-2.0" ]
null
null
null
# ========================================================================== # # Copyright NumFOCUS # # 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/...
34.354957
102
0.639679
888fcff6aec9153f11cabe8640e4fd5a5b23875c
1,432
py
Python
nvhtml/WFS/bin_nvhtml_loc.py
ihgazni2/nvhtml
a43b135f4629f21610ddd0d18daef2b655985970
[ "MIT" ]
null
null
null
nvhtml/WFS/bin_nvhtml_loc.py
ihgazni2/nvhtml
a43b135f4629f21610ddd0d18daef2b655985970
[ "MIT" ]
2
2019-02-24T10:56:15.000Z
2019-08-13T13:23:06.000Z
nvhtml/WFS/bin_nvhtml_loc.py
ihgazni2/nvhtml
a43b135f4629f21610ddd0d18daef2b655985970
[ "MIT" ]
null
null
null
from lxml.etree import HTML as LXHTML from lxml.etree import XML as LXML from xdict.jprint import pdir,pobj from nvhtml import txt from nvhtml import lvsrch from nvhtml import fs from nvhtml import engine from nvhtml import utils import lxml.sax import argparse from efdir import fs import elist.elist as elel import es...
26.518519
91
0.62919
bd3391ffafb16278fc3438e9fffb718d97f45b19
10,079
py
Python
from_cpython/Lib/test/test_index.py
vinzenz/pyston
211aa1dd5b163be7fbe0c0dac85c38b01c36afc2
[ "Apache-2.0", "BSD-2-Clause" ]
null
null
null
from_cpython/Lib/test/test_index.py
vinzenz/pyston
211aa1dd5b163be7fbe0c0dac85c38b01c36afc2
[ "Apache-2.0", "BSD-2-Clause" ]
null
null
null
from_cpython/Lib/test/test_index.py
vinzenz/pyston
211aa1dd5b163be7fbe0c0dac85c38b01c36afc2
[ "Apache-2.0", "BSD-2-Clause" ]
null
null
null
# expected: fail import unittest from test import test_support import operator from sys import maxint maxsize = test_support.MAX_Py_ssize_t minsize = -maxsize-1 class oldstyle: def __index__(self): return self.ind class newstyle(object): def __index__(self): return self.ind class TrapInt(int)...
30.728659
73
0.607203
b6f016036a6cd7f86e726aa9e142cdedec5accf3
6,644
py
Python
sdk/textanalytics/azure-ai-textanalytics/tests/testcase.py
aiven/azure-sdk-for-python
8764dc07423beca46ed0b51212d81289d9e52c60
[ "MIT" ]
2
2019-08-23T21:14:00.000Z
2021-09-07T18:32:34.000Z
sdk/textanalytics/azure-ai-textanalytics/tests/testcase.py
rakshith91/azure-sdk-for-python
3c4f2575d31260fa1bda870b04e34c082ac5702b
[ "MIT" ]
2
2021-11-03T06:10:36.000Z
2021-12-01T06:29:39.000Z
sdk/textanalytics/azure-ai-textanalytics/tests/testcase.py
rakshith91/azure-sdk-for-python
3c4f2575d31260fa1bda870b04e34c082ac5702b
[ "MIT" ]
1
2021-05-19T02:55:10.000Z
2021-05-19T02:55:10.000Z
# coding: utf-8 # ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # --------------------------------------------------------------------...
38.404624
129
0.687538
374f5ee1eccc80149e1d0394bad0a1105cd1251b
11,820
py
Python
django/contrib/postgres/operations.py
peteralexandercharles/django
61c7350f41f2534daf3888709f3c987b7d779a29
[ "BSD-3-Clause", "0BSD" ]
null
null
null
django/contrib/postgres/operations.py
peteralexandercharles/django
61c7350f41f2534daf3888709f3c987b7d779a29
[ "BSD-3-Clause", "0BSD" ]
null
null
null
django/contrib/postgres/operations.py
peteralexandercharles/django
61c7350f41f2534daf3888709f3c987b7d779a29
[ "BSD-3-Clause", "0BSD" ]
null
null
null
from django.contrib.postgres.signals import ( get_citext_oids, get_hstore_oids, register_type_handlers, ) from django.db import NotSupportedError, router from django.db.migrations import AddConstraint, AddIndex, RemoveIndex from django.db.migrations.operations.base import Operation from django.db.models.con...
35.074184
91
0.658629
f8927ab7684a7262f11724a9d9b450aded7fb097
4,309
py
Python
graphene/relay/node.py
hzlmn/graphene
88f79b2850e8fc38254d2c1d8f3900bf3f55dea1
[ "MIT" ]
null
null
null
graphene/relay/node.py
hzlmn/graphene
88f79b2850e8fc38254d2c1d8f3900bf3f55dea1
[ "MIT" ]
null
null
null
graphene/relay/node.py
hzlmn/graphene
88f79b2850e8fc38254d2c1d8f3900bf3f55dea1
[ "MIT" ]
1
2020-06-04T19:20:26.000Z
2020-06-04T19:20:26.000Z
from functools import partial from inspect import isclass from graphql_relay import from_global_id, to_global_id from ..types import ID, Field, Interface, ObjectType from ..types.interface import InterfaceOptions from ..types.utils import get_type def is_node(objecttype): """ Check if the given objecttype h...
31.683824
92
0.62149
f727ed746f16c529677c000a761dd7cf38da957f
8,929
py
Python
.history/pages/intro_20220304123207.py
rypaik/Streamlit_Ref
5ce11cecbe8307238463c126b88b3beed66c99fa
[ "MIT" ]
null
null
null
.history/pages/intro_20220304123207.py
rypaik/Streamlit_Ref
5ce11cecbe8307238463c126b88b3beed66c99fa
[ "MIT" ]
null
null
null
.history/pages/intro_20220304123207.py
rypaik/Streamlit_Ref
5ce11cecbe8307238463c126b88b3beed66c99fa
[ "MIT" ]
null
null
null
""" Off Multipage Cheatsheet https://github.com/daniellewisDL/streamlit-cheat-sheet @daniellewisDL : https://github.com/daniellewisDL """ import streamlit as st from pathlib import Path import base64 from modules.toc import * # Initial page config st.set_page_config( page_title='Code Compendium Intro Page', ...
28.527157
206
0.652593
1f3ee543e0eb1b02840f443ca7ac71a87bbb16bd
921
py
Python
isi_sdk_9_0_0/test/test_cluster_update_lnns.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
24
2018-06-22T14:13:23.000Z
2022-03-23T01:21:26.000Z
isi_sdk_9_0_0/test/test_cluster_update_lnns.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
46
2018-04-30T13:28:22.000Z
2022-03-21T21:11:07.000Z
isi_sdk_9_0_0/test/test_cluster_update_lnns.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
29
2018-06-19T00:14:04.000Z
2022-02-08T17:51:19.000Z
# coding: utf-8 """ Isilon SDK Isilon SDK - Language bindings for the OneFS API # noqa: E501 OpenAPI spec version: 10 Contact: sdk@isilon.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import unittest import isi_sdk_9_0_0 from ...
22.463415
92
0.711183
a21b90ad0720a7ec9a1b990c2bf0db6c1ed8e38c
1,013
py
Python
examples/webcam_facerec/configurator.py
nautilusPrime/facerec_dml
ad163e58f194db61892a4744eed05c87b68807eb
[ "MIT" ]
null
null
null
examples/webcam_facerec/configurator.py
nautilusPrime/facerec_dml
ad163e58f194db61892a4744eed05c87b68807eb
[ "MIT" ]
null
null
null
examples/webcam_facerec/configurator.py
nautilusPrime/facerec_dml
ad163e58f194db61892a4744eed05c87b68807eb
[ "MIT" ]
null
null
null
import os import json import logging.config import logging def setup_logging( default_path='log_config.json', default_level=logging.DEBUG, env_key='LOG_CFG' ): """ Setup logging configuration """ path = default_path value = os.getenv(env_key, None) if value: path = value ...
23.022727
99
0.6308
7535a501d5894265b337afa68b78cb05091059b6
52,490
py
Python
angelexcel.py
AKSHAYMEHARA/angel_smart_api
603c130308404300d57d314b767cfabbef9a6dda
[ "Apache-2.0" ]
1
2022-02-25T19:32:26.000Z
2022-02-25T19:32:26.000Z
angelexcel.py
vikash-sharma-php/angel_smart_api
603c130308404300d57d314b767cfabbef9a6dda
[ "Apache-2.0" ]
null
null
null
angelexcel.py
vikash-sharma-php/angel_smart_api
603c130308404300d57d314b767cfabbef9a6dda
[ "Apache-2.0" ]
2
2022-02-04T03:40:29.000Z
2022-02-25T19:31:43.000Z
from smartapi import SmartConnect, SmartWebSocket import document_detail_Lax import time import datetime import talib as ta import xlwings as xw import pandas as pd api_key = document_detail_Lax.api_key secret_key = document_detail_Lax.secret_key user_id = document_detail_Lax.user_id password = document_det...
28.714442
170
0.498762
ed5da4808c24c65ad56f6927f681af8bce194798
625
py
Python
src/label.py
talhabalaj/daraz-sentiment
e81386bd1e83084c218d317a568927b39b3cb030
[ "Apache-2.0" ]
null
null
null
src/label.py
talhabalaj/daraz-sentiment
e81386bd1e83084c218d317a568927b39b3cb030
[ "Apache-2.0" ]
null
null
null
src/label.py
talhabalaj/daraz-sentiment
e81386bd1e83084c218d317a568927b39b3cb030
[ "Apache-2.0" ]
1
2021-12-16T19:38:46.000Z
2021-12-16T19:38:46.000Z
import csv import nltk from nltk.sentiment import SentimentIntensityAnalyzer from tqdm import tqdm sia = SentimentIntensityAnalyzer() data = csv.reader(open('./../data/cleaned_data.csv', 'r')) new_data = [['reviews', 'cleaned_reviews', 'label']] def normalize(s): if (s > .33): return 1 elif (s < -.33): ...
20.833333
77
0.6832
37d36d7f2ae96866d9527a1120ded898942c92de
611
py
Python
src/bookstats/biblestats/views.py
stetelepta/bookstats
69469b533e7cfb247729b531fe93e980594485c5
[ "MIT" ]
null
null
null
src/bookstats/biblestats/views.py
stetelepta/bookstats
69469b533e7cfb247729b531fe93e980594485c5
[ "MIT" ]
null
null
null
src/bookstats/biblestats/views.py
stetelepta/bookstats
69469b533e7cfb247729b531fe93e980594485c5
[ "MIT" ]
null
null
null
from django.db.models import Sum from django.shortcuts import render from biblestats.models import WordIndex, Chapter def biblestats(request): return render(request, "biblestats.html", {}) def bible_csv(request): index = WordIndex.objects.filter(word__iexact=request.GET.get('word', 'love')) total = inde...
32.157895
82
0.721768
f8119923371819c930b704e41cabf96d5bd53014
250
py
Python
Module01/DataStructure/Set.py
fenglihanxiao/Python
872baf3a3a5ee42740161152605ca2b1ddf4cd30
[ "MIT" ]
null
null
null
Module01/DataStructure/Set.py
fenglihanxiao/Python
872baf3a3a5ee42740161152605ca2b1ddf4cd30
[ "MIT" ]
null
null
null
Module01/DataStructure/Set.py
fenglihanxiao/Python
872baf3a3a5ee42740161152605ca2b1ddf4cd30
[ "MIT" ]
null
null
null
#################################### # 1. Set contains no duplicate data # 2. Can not use index operator set1 = {5, 4, 2, 1, 3, 5} print(set1) #################################### # 1. Only support iteration access for data in set1: print(data)
22.727273
36
0.472
18c4d8456e571c13503342c2a94cbc9746f5603d
3,623
py
Python
core/settings.py
atharvaijantkar21/covid_19_hospital_management
5284f57eddc361a4b814a2062acb023ed5559870
[ "Unlicense" ]
null
null
null
core/settings.py
atharvaijantkar21/covid_19_hospital_management
5284f57eddc361a4b814a2062acb023ed5559870
[ "Unlicense" ]
null
null
null
core/settings.py
atharvaijantkar21/covid_19_hospital_management
5284f57eddc361a4b814a2062acb023ed5559870
[ "Unlicense" ]
null
null
null
""" Django settings for core project. Generated by 'django-admin startproject' using Django 3.1.3. For more information on this file, see https://docs.djangoproject.com/en/3.1/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.1/ref/settings/ """ import os impor...
25.514085
91
0.703837
8dc82c4f2feeb64018d489e06ac4e59fdd0ee0d9
2,379
py
Python
src/py/flwr/common/typing.py
KooperAI/flower
289090d2e2c4f76ec4976e7b14b7d047363b4f77
[ "Apache-2.0" ]
3
2021-11-17T23:36:38.000Z
2022-03-03T11:43:17.000Z
src/py/flwr/common/typing.py
KooperAI/flower
289090d2e2c4f76ec4976e7b14b7d047363b4f77
[ "Apache-2.0" ]
4
2021-08-09T22:41:28.000Z
2021-08-09T22:45:31.000Z
src/py/flwr/common/typing.py
KooperAI/flower
289090d2e2c4f76ec4976e7b14b7d047363b4f77
[ "Apache-2.0" ]
3
2021-12-06T10:48:44.000Z
2022-01-31T21:28:52.000Z
# Copyright 2020 Adap GmbH. 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 ag...
24.27551
85
0.700294
7ac1f198fd313c276c8ebde07b0849ff53f1ace2
8,710
py
Python
sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/__init__.py
mohamedshabanofficial/azure-sdk-for-python
81c585f310cd2ec23d2ad145173958914a075a58
[ "MIT" ]
2
2019-08-23T21:14:00.000Z
2021-09-07T18:32:34.000Z
sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/__init__.py
mohamedshabanofficial/azure-sdk-for-python
81c585f310cd2ec23d2ad145173958914a075a58
[ "MIT" ]
null
null
null
sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/__init__.py
mohamedshabanofficial/azure-sdk-for-python
81c585f310cd2ec23d2ad145173958914a075a58
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
40.138249
94
0.737543
4811a3eeb23ed94dcba702bd91a580bf2f82bd69
927
py
Python
Projects/Online Workouts/w3resource/Basic - Part-I/program-30.py
ivenpoker/Python-Projects
2975e1bd687ec8dbcc7a4842c13466cb86292679
[ "MIT" ]
1
2019-09-23T15:51:45.000Z
2019-09-23T15:51:45.000Z
Projects/Online Workouts/w3resource/Basic - Part-I/program-30.py
ivenpoker/Python-Projects
2975e1bd687ec8dbcc7a4842c13466cb86292679
[ "MIT" ]
5
2021-02-08T20:47:19.000Z
2022-03-12T00:35:44.000Z
Projects/Online Workouts/w3resource/Basic - Part-I/program-30.py
ivenpoker/Python-Projects
2975e1bd687ec8dbcc7a4842c13466cb86292679
[ "MIT" ]
null
null
null
# !/usr/bin/env python3 ############################################################################# # # # Program purpose: Computes the area of a triangle. # # Program Author : Happi Yvan <ivensteinpoker@gmail.c...
40.304348
77
0.393743
978d26ff2e412a67f378c90ceab8b53fde535810
12,998
py
Python
pygents/text.py
aigents/pygents
434e159f7c2158195be7160db21423b5467ba6d3
[ "MIT" ]
null
null
null
pygents/text.py
aigents/pygents
434e159f7c2158195be7160db21423b5467ba6d3
[ "MIT" ]
null
null
null
pygents/text.py
aigents/pygents
434e159f7c2158195be7160db21423b5467ba6d3
[ "MIT" ]
null
null
null
import html import pandas as pd import urllib.request from pygents.util import dictcount, merge_two_dicts, countcount, counters_init, merge_dicts delimiters = ' \t\n\r\'`"“”+=-_&/|\*()[]<>#^@~,;:.!?' def url_text(url,debug = False,linefeeds=False): text = '' lines = 0 for line in urllib.request.urlopen(...
35.906077
343
0.540622
691c0829a3333c436e566382fdb2f07df2b4bd43
479
py
Python
allocation/entities/discipline.py
gabrielpereiram10/allocation
24bc33ca4b3377ebb02f9c4d2f6a878aa46bac14
[ "MIT" ]
null
null
null
allocation/entities/discipline.py
gabrielpereiram10/allocation
24bc33ca4b3377ebb02f9c4d2f6a878aa46bac14
[ "MIT" ]
null
null
null
allocation/entities/discipline.py
gabrielpereiram10/allocation
24bc33ca4b3377ebb02f9c4d2f6a878aa46bac14
[ "MIT" ]
null
null
null
class Discipline: def __init__(self, semester, name, professor): self.semester = semester self.name = name self.professor = professor def __eq__(self, other: object) -> bool: return isinstance(other, Discipline) and other.name == self.name and other.semester == self.semester and...
31.933333
146
0.647182
f58bf3e9ad2f6ff117e29030fc8ed8e958079166
3,081
py
Python
hudjango/serializers.py
mdornseif/huDjango
ce6f256b2e3e9fec4af749aebcae81a973e8874b
[ "BSD-2-Clause" ]
null
null
null
hudjango/serializers.py
mdornseif/huDjango
ce6f256b2e3e9fec4af749aebcae81a973e8874b
[ "BSD-2-Clause" ]
1
2017-02-16T16:07:03.000Z
2017-02-17T09:49:20.000Z
hudjango/serializers.py
hudora/huDjango
c99ce38517d706973df8e97df48274ab9392f52e
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python # encoding: utf-8 """ hudjango/serializers.py - serialize QuerySets or lit of objects to Excel/XLS. http://docs.djangoproject.com/en/dev/topics/serialization/ is inspiration for this. Created by Maximillian Dornseif on 2009-08-17. Copyright (c) 2009 HUDORA. All rights reserved. """ import djan...
34.617978
108
0.630964
5e4f41a53e8356d9606430c1dcd5568075de6f5b
766
py
Python
app/core/admin.py
Ruiponche/recipe-app-api
031bbd2c556dc6c9a6b877c76cd25ef00bc3eb14
[ "MIT" ]
null
null
null
app/core/admin.py
Ruiponche/recipe-app-api
031bbd2c556dc6c9a6b877c76cd25ef00bc3eb14
[ "MIT" ]
null
null
null
app/core/admin.py
Ruiponche/recipe-app-api
031bbd2c556dc6c9a6b877c76cd25ef00bc3eb14
[ "MIT" ]
null
null
null
from django.contrib import admin from django.contrib.auth.admin import UserAdmin as BaseUserAdmin from django.utils.translation import gettext as _ from core import models class UserAdmin(BaseUserAdmin): ordering = ['id'] list_display = ['email', 'name'] fieldsets = ( (None, {'fields': ('email', ...
27.357143
82
0.5953
288e82e8f1faf60038536c5b5205d91c6b87072d
193
py
Python
SEP06/01.py
Razdeep/PythonSnippets
76f9313894f511c487a99bc38bdf0fe5e594caf5
[ "MIT" ]
null
null
null
SEP06/01.py
Razdeep/PythonSnippets
76f9313894f511c487a99bc38bdf0fe5e594caf5
[ "MIT" ]
null
null
null
SEP06/01.py
Razdeep/PythonSnippets
76f9313894f511c487a99bc38bdf0fe5e594caf5
[ "MIT" ]
null
null
null
# min and max functions on dictionaries d={321:10,322:56,323:7} print(min(d,key=d.get)) # returns the key where the value is min print(max(d,key=d.get)) # returns the key where the value is max
48.25
64
0.73057
2a6d32519d001133e922eee3ab02d6b808785c6d
974
py
Python
tests/test_transform_util.py
xmyqsh/fvcore
364d1bb6f1ac66368dff710dee491422b8569695
[ "Apache-2.0" ]
null
null
null
tests/test_transform_util.py
xmyqsh/fvcore
364d1bb6f1ac66368dff710dee491422b8569695
[ "Apache-2.0" ]
null
null
null
tests/test_transform_util.py
xmyqsh/fvcore
364d1bb6f1ac66368dff710dee491422b8569695
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. import numpy as np import unittest from fvcore.transforms.transform_util import to_float_tensor, to_numpy class TestTransformUtil(unittest.TestCase): def test_convert(self): N, C, H, W = 4, 64, 14, 14 ...
30.4375
71
0.593429
b87333f4583af25cd4986449e45037ccdf81eb9b
13,434
py
Python
vistrails/core/paramexplore/paramexplore.py
celiafish/VisTrails
d8cb575b8b121941de190fe608003ad1427ef9f6
[ "BSD-3-Clause" ]
1
2020-03-13T20:56:21.000Z
2020-03-13T20:56:21.000Z
vistrails/core/paramexplore/paramexplore.py
celiafish/VisTrails
d8cb575b8b121941de190fe608003ad1427ef9f6
[ "BSD-3-Clause" ]
null
null
null
vistrails/core/paramexplore/paramexplore.py
celiafish/VisTrails
d8cb575b8b121941de190fe608003ad1427ef9f6
[ "BSD-3-Clause" ]
null
null
null
############################################################################### ## ## Copyright (C) 2011-2014, NYU-Poly. ## Copyright (C) 2006-2011, University of Utah. ## All rights reserved. ## Contact: contact@vistrails.org ## ## This file is part of VisTrails. ## ## "Redistribution and use in source and binary for...
41.98125
82
0.533795
7e945bbdc5463b406702c107998275e8f3e17bb4
2,113
py
Python
profile_api/models.py
abhishekmandloi95/profiles-rest-api
3445b4b5da47f3e3e085993fbaa00244a1e45356
[ "MIT" ]
null
null
null
profile_api/models.py
abhishekmandloi95/profiles-rest-api
3445b4b5da47f3e3e085993fbaa00244a1e45356
[ "MIT" ]
null
null
null
profile_api/models.py
abhishekmandloi95/profiles-rest-api
3445b4b5da47f3e3e085993fbaa00244a1e45356
[ "MIT" ]
null
null
null
from django.db import models from django.contrib.auth.models import AbstractBaseUser from django.contrib.auth.models import PermissionsMixin from django.contrib.auth.models import BaseUserManager from django.conf import settings class UserProfileManager(BaseUserManager): """Manager for user profiles""" ...
29.347222
68
0.652627
5bc1c0c9f0a2d082654c190982b13b64c1913845
20,483
py
Python
pycroscopy/analysis/utils/giv_utils.py
kbschliep/pycroscopy
4f18e7b453aca496e611603616112c1a1a524beb
[ "MIT" ]
1
2021-11-13T05:15:58.000Z
2021-11-13T05:15:58.000Z
pycroscopy/analysis/utils/giv_utils.py
kbschliep/pycroscopy
4f18e7b453aca496e611603616112c1a1a524beb
[ "MIT" ]
null
null
null
pycroscopy/analysis/utils/giv_utils.py
kbschliep/pycroscopy
4f18e7b453aca496e611603616112c1a1a524beb
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Thu Jan 12 15:31:55 2017 @author: Suhas Somnath, Kody Law, Rama K. Vasudevan """ from __future__ import division, print_function, absolute_import import numpy as np import matplotlib.pyplot as plt from scipy.linalg import sqrtm from pyUSID.io.hdf_utils import get_auxiliary_data...
42.672917
119
0.595372