hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 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 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 239 | max_forks_repo_name stringlengths 5 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 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7976b9798f414f1821adfb17fa474f1f407ad930 | 19,198 | py | Python | elfwrapper/elf_wrapper.py | sgnes/elf_dwarf_wrapper | 1e8442f247f010474216faeb3dcd7c8a8b84640d | [
"MIT"
] | 4 | 2020-09-16T22:00:00.000Z | 2021-12-12T16:11:29.000Z | elfwrapper/elf_wrapper.py | sgnes/elf_dwarf_wrapper | 1e8442f247f010474216faeb3dcd7c8a8b84640d | [
"MIT"
] | 1 | 2020-12-07T17:03:44.000Z | 2021-09-12T01:12:39.000Z | elfwrapper/elf_wrapper.py | sgnes/elf_dwarf_wrapper | 1e8442f247f010474216faeb3dcd7c8a8b84640d | [
"MIT"
] | 2 | 2020-05-30T20:30:09.000Z | 2020-09-23T10:45:53.000Z | import re
from elftools.elf.sections import NoteSection, SymbolTableSection
from elftools.common.py3compat import (
ifilter, byte2int, bytes2str, itervalues, str2bytes)
from elftools.elf.elffile import ELFFile
from elftools.dwarf.descriptions import (
describe_reg_name, describe_attr_value, set_global_machine_a... | 42.662222 | 137 | 0.595322 |
7976b9ef9a8260992714e7fb53fe8b36a1bc4826 | 22,035 | py | Python | stock_portfolio_analyzer.py | jmonsalverodilla/Stock-Portfolio-Tracker | 320beb97e09fb1073ac7c264a0d8e1a65db7013d | [
"MIT"
] | null | null | null | stock_portfolio_analyzer.py | jmonsalverodilla/Stock-Portfolio-Tracker | 320beb97e09fb1073ac7c264a0d8e1a65db7013d | [
"MIT"
] | null | null | null | stock_portfolio_analyzer.py | jmonsalverodilla/Stock-Portfolio-Tracker | 320beb97e09fb1073ac7c264a0d8e1a65db7013d | [
"MIT"
] | null | null | null | #Libraries
import base64
import datetime
from io import BytesIO, StringIO
import os
import pandas as pd
import streamlit as st
import plotly
import yfinance as yf
from technical_analysis import download_data, portfolio_return, benchmark_return, wealth_plot,accumulated_return_plot, drawdawn_plot, allocation_plot, day_r... | 62.599432 | 209 | 0.575448 |
7976bc0ab8932f9c929b4e4cd22ebf4a017a9a8f | 826 | py | Python | app/definitions/migrations/0014_auto_20200826_0159.py | getmetamapper/metamapper | 0b2f67eec03fbf7ece35ff9f58ea9bb2dde4d85f | [
"BSD-2-Clause"
] | 53 | 2020-07-01T23:11:59.000Z | 2022-03-31T19:10:28.000Z | app/definitions/migrations/0014_auto_20200826_0159.py | getmetamapper/metamapper | 0b2f67eec03fbf7ece35ff9f58ea9bb2dde4d85f | [
"BSD-2-Clause"
] | 5 | 2020-11-25T19:48:57.000Z | 2022-02-27T23:50:18.000Z | app/definitions/migrations/0014_auto_20200826_0159.py | getmetamapper/metamapper | 0b2f67eec03fbf7ece35ff9f58ea9bb2dde4d85f | [
"BSD-2-Clause"
] | 5 | 2020-08-29T16:43:59.000Z | 2022-01-17T19:05:30.000Z | # Generated by Django 3.0.8 on 2020-08-26 01:59
from django.db import migrations, models
import django.db.models.manager
import utils.delete.managers
class Migration(migrations.Migration):
dependencies = [
('definitions', '0013_auto_20200819_1624'),
]
operations = [
migrations.AlterMode... | 28.482759 | 93 | 0.606538 |
7976bea1a5a412b46de91f4858744b8a7fba92a1 | 955 | py | Python | tests/plottest.py | qacwnfq/linmix | 36635592d76d2d0e06324265ede385e2d5bcc721 | [
"BSD-2-Clause"
] | 46 | 2015-09-18T21:05:00.000Z | 2021-10-08T12:31:12.000Z | tests/plottest.py | qacwnfq/linmix | 36635592d76d2d0e06324265ede385e2d5bcc721 | [
"BSD-2-Clause"
] | 20 | 2015-05-05T00:16:33.000Z | 2021-08-11T20:13:34.000Z | tests/plottest.py | qacwnfq/linmix | 36635592d76d2d0e06324265ede385e2d5bcc721 | [
"BSD-2-Clause"
] | 13 | 2016-09-22T06:09:28.000Z | 2022-02-01T13:14:31.000Z | import numpy as np
import matplotlib.pyplot as plt
import astropy.io.ascii as ascii
data = ascii.read('test.dat')
pyout = ascii.read('test.pyout')
idlout = ascii.read('test.idlout')
fig = plt.figure()
ax = fig.add_subplot(111)
ax.scatter(data['x'], data['y'], c='k')
ax.errorbar(data['x'], data['y'], xerr=data['xsig'... | 26.527778 | 86 | 0.65445 |
7976bf5b6f0e2a1fc2451e234113e39054a5e803 | 2,642 | py | Python | support_files/page_building/python_files/page_builder.py | miccaldas/feeds | b603aee7f2e2ef58ff7ffcb4c0786b13d693fbac | [
"MIT"
] | null | null | null | support_files/page_building/python_files/page_builder.py | miccaldas/feeds | b603aee7f2e2ef58ff7ffcb4c0786b13d693fbac | [
"MIT"
] | null | null | null | support_files/page_building/python_files/page_builder.py | miccaldas/feeds | b603aee7f2e2ef58ff7ffcb4c0786b13d693fbac | [
"MIT"
] | null | null | null | """The goal is to have a python page generator that, if needed, can easily redo all pages on site or make alterations on their structure.
This way all changes to the structure can be done on the templates or through the information that is sent to these python files."""
import subprocess
import isort # noqa: F401... | 37.211268 | 137 | 0.612793 |
7976bf6e7ce70aaa5404556ae23e879c11d229d3 | 87 | py | Python | Classes/__init__.py | lukkascost/MachineLearn | 0c6228216d3c1e8b8f85b3e88b1306a7ff042e81 | [
"MIT"
] | 5 | 2018-02-01T22:15:46.000Z | 2021-05-12T13:34:22.000Z | Classes/__init__.py | lukkascost/MachineLearn | 0c6228216d3c1e8b8f85b3e88b1306a7ff042e81 | [
"MIT"
] | null | null | null | Classes/__init__.py | lukkascost/MachineLearn | 0c6228216d3c1e8b8f85b3e88b1306a7ff042e81 | [
"MIT"
] | null | null | null | from .data import Data
from .data_set import DataSet
from .experiment import Experiment | 29 | 34 | 0.83908 |
7976bff2b35d09d46a1e7f1d3ace5cfc90426eca | 411 | py | Python | raster/migrations/0003_rastertile_level.py | mcldev/django-raster | 03fc7c83c22fd10583005dd57ad92e30954b9895 | [
"BSD-3-Clause"
] | 77 | 2015-02-08T00:55:09.000Z | 2022-02-03T17:00:54.000Z | raster/migrations/0003_rastertile_level.py | mcldev/django-raster | 03fc7c83c22fd10583005dd57ad92e30954b9895 | [
"BSD-3-Clause"
] | 56 | 2015-01-07T03:25:50.000Z | 2022-01-18T14:44:31.000Z | raster/migrations/0003_rastertile_level.py | mcldev/django-raster | 03fc7c83c22fd10583005dd57ad92e30954b9895 | [
"BSD-3-Clause"
] | 39 | 2015-01-31T00:12:18.000Z | 2021-09-15T10:40:46.000Z | # -*- coding: utf-8 -*-
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('raster', '0002_auto_20140925_0723'),
]
operations = [
migrations.AddField(
model_name='rastertile',
name='level',
field=models.In... | 21.631579 | 64 | 0.581509 |
7976c0836fbabce1a9e1f97d30b60be6dddbd65b | 16,012 | py | Python | log_casp_act/model_607.py | LoLab-VU/Bayesian_Inference_of_Network_Dynamics | 54a5ef7e868be34289836bbbb024a2963c0c9c86 | [
"MIT"
] | null | null | null | log_casp_act/model_607.py | LoLab-VU/Bayesian_Inference_of_Network_Dynamics | 54a5ef7e868be34289836bbbb024a2963c0c9c86 | [
"MIT"
] | null | null | null | log_casp_act/model_607.py | LoLab-VU/Bayesian_Inference_of_Network_Dynamics | 54a5ef7e868be34289836bbbb024a2963c0c9c86 | [
"MIT"
] | null | null | null | # exported from PySB model 'model'
from pysb import Model, Monomer, Parameter, Expression, Compartment, Rule, Observable, Initial, MatchOnce, Annotation, ANY, WILD
Model()
Monomer('Ligand', ['Receptor'])
Monomer('ParpU', ['C3A'])
Monomer('C8A', ['BidU', 'C3pro'])
Monomer('BaxM', ['BidM', 'BaxA'])
Monomer('Apop', ['C... | 84.273684 | 614 | 0.812266 |
7976c2a87b1012a868a1a9daa4f988363db39e87 | 6,207 | py | Python | BIgame.py | 8BookIt8/Genetic-Algorithm | 6293e075fe2b76755cda3bb98e5c670f5d36f812 | [
"BSD-3-Clause"
] | 2 | 2021-08-19T06:56:22.000Z | 2021-08-28T15:29:48.000Z | BIgame.py | 8BookIt8/Genetic-Algorithm | 6293e075fe2b76755cda3bb98e5c670f5d36f812 | [
"BSD-3-Clause"
] | null | null | null | BIgame.py | 8BookIt8/Genetic-Algorithm | 6293e075fe2b76755cda3bb98e5c670f5d36f812 | [
"BSD-3-Clause"
] | null | null | null | from os import name
import matplotlib
import BIbear
import BIfood
import BIgeneration
import pygame
import matplotlib.pyplot as plt
import matplotlib.font_manager as fm
import yaml
from random import uniform, randrange
import math
import keyboard
import time
class BIGame():
# 기본 설정
def __init__(self):
... | 32.328125 | 147 | 0.567585 |
7976c2f4001c950980048a52de26251ff03dca27 | 4,342 | py | Python | contrib/seeds/generate-seeds.py | zurxcoin/zurxcoin | 6b6cb5e38dcbc823a8f1155b1b0cc94c9232366b | [
"MIT"
] | null | null | null | contrib/seeds/generate-seeds.py | zurxcoin/zurxcoin | 6b6cb5e38dcbc823a8f1155b1b0cc94c9232366b | [
"MIT"
] | null | null | null | contrib/seeds/generate-seeds.py | zurxcoin/zurxcoin | 6b6cb5e38dcbc823a8f1155b1b0cc94c9232366b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014-2017 Wladimir J. van der Laan
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
Script to generate list of seed nodes for chainparams.cpp.
This script expects two text files in the dir... | 31.23741 | 98 | 0.579687 |
7976c392d596812bc776055d6a0616d9506e9e4c | 2,884 | py | Python | src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_05.py | robszewczyk/openweave-core | f452cc55859daea83b3ce7af158c8e78b05cc3bc | [
"Apache-2.0"
] | 249 | 2017-09-18T17:48:34.000Z | 2022-02-02T06:46:21.000Z | src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_05.py | robszewczyk/openweave-core | f452cc55859daea83b3ce7af158c8e78b05cc3bc | [
"Apache-2.0"
] | 501 | 2017-11-10T11:25:32.000Z | 2022-02-01T10:43:13.000Z | src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_05.py | robszewczyk/openweave-core | f452cc55859daea83b3ce7af158c8e78b05cc3bc | [
"Apache-2.0"
] | 116 | 2017-09-20T07:06:55.000Z | 2022-01-08T13:41:15.000Z | #!/usr/bin/env python3
#
# Copyright (c) 2016-2017 Nest Labs, 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/lic... | 46.516129 | 149 | 0.679612 |
7976c4082f1f808eb60dd0a580f9a58c806ab538 | 3,621 | py | Python | storm_control/sc_hardware/baseClasses/lockModule.py | shiwei23/STORM6 | 669067503ebd164b575ce529fcc4a9a3f576b3d7 | [
"MIT"
] | 1 | 2022-03-29T22:40:38.000Z | 2022-03-29T22:40:38.000Z | storm_control/sc_hardware/baseClasses/lockModule.py | shiwei23/STORM6 | 669067503ebd164b575ce529fcc4a9a3f576b3d7 | [
"MIT"
] | null | null | null | storm_control/sc_hardware/baseClasses/lockModule.py | shiwei23/STORM6 | 669067503ebd164b575ce529fcc4a9a3f576b3d7 | [
"MIT"
] | 1 | 2020-11-10T06:39:18.000Z | 2020-11-10T06:39:18.000Z | #!/usr/bin/env python
"""
The core functionality for a QPD, QPD/Camera or z stage.
Hazen 04/17
"""
import storm_control.sc_hardware.baseClasses.hardwareModule as hardwareModule
class LockFunctionalityMixin(object):
"""
Combine this with either a HardwareFunctionality or a
BufferedFunctionality depending... | 26.430657 | 81 | 0.619994 |
7976c451424c138c715dc7b95b61a95b4c69813d | 26,929 | py | Python | grr/server/grr_response_server/gui/gui_test_lib.py | blackstarkk/grr | b6254df20850d0a3f4b5ee2ae12f38d7063b7c14 | [
"Apache-2.0"
] | null | null | null | grr/server/grr_response_server/gui/gui_test_lib.py | blackstarkk/grr | b6254df20850d0a3f4b5ee2ae12f38d7063b7c14 | [
"Apache-2.0"
] | 3 | 2021-05-11T20:18:38.000Z | 2022-03-02T09:33:56.000Z | grr/server/grr_response_server/gui/gui_test_lib.py | suraj-testing2/Plants_Book | b6254df20850d0a3f4b5ee2ae12f38d7063b7c14 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Lint as: python3
"""Helper functionality for gui testing."""
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
import atexit
import binascii
import functools
import logging
import os
import threading
import time
from urllib import par... | 32.920538 | 96 | 0.706933 |
7976c475051daee2be435639e9968416903da56b | 7,613 | py | Python | src/SNGAN/evaluation.py | xxchenxx/GAN-LTH | 71a25098656c4c990835288e6f763f863d227c10 | [
"MIT"
] | 24 | 2021-01-13T08:22:02.000Z | 2022-01-08T13:54:16.000Z | src/SNGAN/evaluation.py | xxchenxx/GAN-LTH | 71a25098656c4c990835288e6f763f863d227c10 | [
"MIT"
] | null | null | null | src/SNGAN/evaluation.py | xxchenxx/GAN-LTH | 71a25098656c4c990835288e6f763f863d227c10 | [
"MIT"
] | 6 | 2021-01-18T12:54:34.000Z | 2022-01-08T13:54:17.000Z | import os
import torch
import torch.nn as nn
import numpy as np
from imageio import imsave
from torchvision.utils import make_grid
import torch.nn.utils.prune as prune
import argparse
from tqdm import tqdm
from copy import deepcopy
from utils.utils import set_seed
from utils.inception_score import get_inception_sco... | 38.841837 | 123 | 0.67122 |
7976c48a3e93697e35ed314bdaaea252fba34b1b | 6,400 | py | Python | test/test_worker_ingest.py | kryptoslogic/assemblyline-core | 8837f6646d89b8f589b31d101059bb6450fc91e8 | [
"MIT"
] | null | null | null | test/test_worker_ingest.py | kryptoslogic/assemblyline-core | 8837f6646d89b8f589b31d101059bb6450fc91e8 | [
"MIT"
] | null | null | null | test/test_worker_ingest.py | kryptoslogic/assemblyline-core | 8837f6646d89b8f589b31d101059bb6450fc91e8 | [
"MIT"
] | null | null | null | import pytest
from unittest import mock
import time
from assemblyline.datastore.helper import AssemblylineDatastore
from assemblyline.common.metrics import MetricsFactory
from assemblyline.odm.models.user import User
from assemblyline.odm.randomizer import random_minimal_obj
from assemblyline_core.ingester.run_ingest... | 34.224599 | 110 | 0.7 |
7976c5d831f1d5af6d7ac860efcf15c076ef342c | 27,911 | py | Python | dask_kubernetes/core.py | adammrozik/dask-kubernetes | 1c599e3b578f833c4838bc4481619745c089f332 | [
"BSD-3-Clause"
] | null | null | null | dask_kubernetes/core.py | adammrozik/dask-kubernetes | 1c599e3b578f833c4838bc4481619745c089f332 | [
"BSD-3-Clause"
] | null | null | null | dask_kubernetes/core.py | adammrozik/dask-kubernetes | 1c599e3b578f833c4838bc4481619745c089f332 | [
"BSD-3-Clause"
] | null | null | null | import asyncio
import copy
import getpass
import logging
import os
import string
import time
import uuid
from weakref import finalize
try:
import yaml
except ImportError:
yaml = False
import dask
import dask.distributed
import distributed.security
from distributed.deploy import SpecCluster, ProcessInterface
f... | 35.691816 | 115 | 0.609975 |
7976c62bf485d96a3dec46fbc04dc8c055996a9f | 1,790 | py | Python | wbb/utils/json_prettify.py | dashezup/WilliamButcherBot | 57b5dde08cdf12d19164d750446c5c1ea00a7d9b | [
"MIT"
] | 1 | 2021-06-28T06:27:48.000Z | 2021-06-28T06:27:48.000Z | wbb/utils/json_prettify.py | dashezup/WilliamButcherBot | 57b5dde08cdf12d19164d750446c5c1ea00a7d9b | [
"MIT"
] | null | null | null | wbb/utils/json_prettify.py | dashezup/WilliamButcherBot | 57b5dde08cdf12d19164d750446c5c1ea00a7d9b | [
"MIT"
] | 2 | 2021-07-03T03:05:03.000Z | 2021-12-04T08:26:10.000Z | """
MIT License
Copyright (c) 2021 TheHamkerCat
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, ... | 34.423077 | 78 | 0.661453 |
7976c6672812b1530615c8d55f357f3a05e58ad8 | 8,562 | py | Python | autofit/messages/normal.py | rhayes777/AutoFit | f5d769755b85a6188ec1736d0d754f27321c2f06 | [
"MIT"
] | null | null | null | autofit/messages/normal.py | rhayes777/AutoFit | f5d769755b85a6188ec1736d0d754f27321c2f06 | [
"MIT"
] | null | null | null | autofit/messages/normal.py | rhayes777/AutoFit | f5d769755b85a6188ec1736d0d754f27321c2f06 | [
"MIT"
] | null | null | null | import math
from typing import Tuple, Union
import numpy as np
from scipy.special.cython_special import erfcinv
from scipy.stats import norm
from autoconf import cached_property
from autofit.mapper.operator import LinearOperator
from autofit.messages.abstract import AbstractMessage
from .transform import (
phi_tr... | 30.254417 | 116 | 0.592852 |
7976c6758ae94c9c253d2bddc58c1bb3ecfaabd6 | 5,579 | py | Python | Term 1- Computer Vision and Deep Learning/Project 3 - Behavioral Cloning/model.py | jlema/Udacity-Self-Driving-Car-Engineer-Nanodegree | 55ea131feded258015af418a087fbb7a88659fc3 | [
"Apache-2.0"
] | null | null | null | Term 1- Computer Vision and Deep Learning/Project 3 - Behavioral Cloning/model.py | jlema/Udacity-Self-Driving-Car-Engineer-Nanodegree | 55ea131feded258015af418a087fbb7a88659fc3 | [
"Apache-2.0"
] | null | null | null | Term 1- Computer Vision and Deep Learning/Project 3 - Behavioral Cloning/model.py | jlema/Udacity-Self-Driving-Car-Engineer-Nanodegree | 55ea131feded258015af418a087fbb7a88659fc3 | [
"Apache-2.0"
] | null | null | null | import argparse
import json
import pandas as pd
import numpy as np
from image_preproc import load_image, reduce_image, flip_image, trans_image, crop_image, scale_brightness_image
from keras.models import Sequential
from keras.layers import Dense, Flatten, Lambda, ELU
from keras.layers import Convolution2D
from keras.c... | 40.136691 | 122 | 0.628428 |
7976c7d3c510c2cf84aba18dce4e4141db3e2702 | 575 | py | Python | stackless/tasklets.py | irr/python-labs | 43bb3a528c151653b2be832c7ff13240a10e18a4 | [
"Apache-2.0"
] | 4 | 2015-11-25T09:06:44.000Z | 2019-12-11T21:35:21.000Z | stackless/tasklets.py | irr/python-labs | 43bb3a528c151653b2be832c7ff13240a10e18a4 | [
"Apache-2.0"
] | null | null | null | stackless/tasklets.py | irr/python-labs | 43bb3a528c151653b2be832c7ff13240a10e18a4 | [
"Apache-2.0"
] | 2 | 2015-11-25T09:19:38.000Z | 2016-02-26T03:54:06.000Z | import stackless
from optparse import OptionParser
parser = OptionParser()
parser.add_option("-n", type="int", dest="num_tasklets", help="how many", default=100000)
def f(left, right):
left.send(right.receive()+1)
def main():
options, args = parser.parse_args()
leftmost = stackless.channel()
left, ri... | 25 | 89 | 0.68 |
7976c8020968f2538fea685ffe3e1a3da4042acf | 3,216 | py | Python | be-image/server/apis/updates.py | IBM/geospatial-event-observations | 6e9bd8759f8b66c841ce0afea1ddd173c668f293 | [
"CC-BY-4.0",
"BSD-3-Clause"
] | 1 | 2022-02-24T06:53:56.000Z | 2022-02-24T06:53:56.000Z | be-image/server/apis/updates.py | IBM/geospatial-event-observations | 6e9bd8759f8b66c841ce0afea1ddd173c668f293 | [
"CC-BY-4.0",
"BSD-3-Clause"
] | 12 | 2021-03-02T01:45:03.000Z | 2022-03-08T23:32:46.000Z | be-image/server/apis/updates.py | IBM/geospatial-event-observations | 6e9bd8759f8b66c841ce0afea1ddd173c668f293 | [
"CC-BY-4.0",
"BSD-3-Clause"
] | null | null | null | #
# Licensed Materials - Property of IBM
# 6949-04J
# © Copyright IBM Corp. 2020 All Rights Reserved
#
from flask import jsonify, make_response, request, Response
from flask_restplus import fields, Namespace, Resource
import glob
import json
from multiprocessing import Manager
import os
import shutil
from sqlalchemy.sq... | 31.223301 | 134 | 0.588619 |
7976c833ab900c1b3c38868cae42bb014ff37c7e | 5,997 | py | Python | sample/FileFinder.py | JarryShaw/impfxxk | 55f121dbf2ed4f643c99836e7cc295f83011ef13 | [
"MIT"
] | null | null | null | sample/FileFinder.py | JarryShaw/impfxxk | 55f121dbf2ed4f643c99836e7cc295f83011ef13 | [
"MIT"
] | null | null | null | sample/FileFinder.py | JarryShaw/impfxxk | 55f121dbf2ed4f643c99836e7cc295f83011ef13 | [
"MIT"
] | null | null | null | class FileFinder:
"""File-based finder.
Interactions with the file system are cached for performance, being
refreshed when the directory the finder is handling has been modified.
"""
def __init__(self, path, *loader_details):
"""Initialize with the path to search on and a variable number... | 41.075342 | 97 | 0.608137 |
7976c91f292b329ecb96a0ba88d57ff62e99c597 | 1,457 | py | Python | tests/test_register_config.py | VCT-223963/dubbo-client-py | de1206f22839b4737277db9158ba701d61fe2af7 | [
"Apache-2.0"
] | 94 | 2019-06-03T05:11:52.000Z | 2022-01-28T13:31:46.000Z | tests/test_register_config.py | wuwen5/dubbo-python | d86ad6acd30592c2389c6aba4360e0b61b8396dc | [
"Apache-2.0"
] | 9 | 2019-07-23T03:38:05.000Z | 2021-12-08T05:22:03.000Z | tests/test_register_config.py | wuwen5/dubbo-python | d86ad6acd30592c2389c6aba4360e0b61b8396dc | [
"Apache-2.0"
] | 36 | 2015-06-08T07:14:30.000Z | 2022-02-28T11:21:55.000Z | # coding=utf-8
"""
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"); y... | 36.425 | 77 | 0.756349 |
7976c933205639ea5d5fb37df054b2e9572b493b | 4,857 | py | Python | linkmanager/settings.py | mothsART/linkmanager | 5213eb2757e76caaf919bc1f5158af7830fb4165 | [
"BSD-2-Clause"
] | null | null | null | linkmanager/settings.py | mothsART/linkmanager | 5213eb2757e76caaf919bc1f5158af7830fb4165 | [
"BSD-2-Clause"
] | null | null | null | linkmanager/settings.py | mothsART/linkmanager | 5213eb2757e76caaf919bc1f5158af7830fb4165 | [
"BSD-2-Clause"
] | null | null | null | import os
import configparser
import logging
logger = logging.getLogger()
from clint.textui.colored import white
from linkmanager.translation import gettext as _
DEBUG = True
SERVER = False
# -- Database
DB = {
'ENGINE': 'redis',
'HOST': 'localhost',
'PORT': 6379,
'DB_NB': 0
}
# -- Cache
ACTIVE_CA... | 26.396739 | 80 | 0.642784 |
7976c93c09c5ca86da39167094b0f4b8a3b2004d | 4,616 | py | Python | src/controller/python/chip/internal/commissioner.py | AnthonyDiGirolamo/connectedhomeip | 3bec0f9c1b76afea4c85fb8f5d5630370409fae5 | [
"Apache-2.0"
] | 3 | 2022-02-09T08:42:16.000Z | 2022-02-22T04:47:02.000Z | src/controller/python/chip/internal/commissioner.py | AnthonyDiGirolamo/connectedhomeip | 3bec0f9c1b76afea4c85fb8f5d5630370409fae5 | [
"Apache-2.0"
] | 169 | 2020-08-03T23:58:39.000Z | 2022-03-19T12:57:33.000Z | src/controller/python/chip/internal/commissioner.py | AnthonyDiGirolamo/connectedhomeip | 3bec0f9c1b76afea4c85fb8f5d5630370409fae5 | [
"Apache-2.0"
] | 7 | 2021-04-26T06:22:35.000Z | 2021-12-16T07:10:43.000Z | #
# Copyright (c) 2021 Project CHIP Authors
#
# 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... | 32.737589 | 109 | 0.731586 |
7976c962dc962fcd0b31c6adbfa11f2b8cc6856e | 130 | py | Python | mysite/homepage/urls.py | jingluomaf/django-mysite | 5a106df6c18e7bd49e02cd29fa3dfe11b5c26ff5 | [
"MIT"
] | null | null | null | mysite/homepage/urls.py | jingluomaf/django-mysite | 5a106df6c18e7bd49e02cd29fa3dfe11b5c26ff5 | [
"MIT"
] | 14 | 2020-06-05T22:51:09.000Z | 2022-03-12T00:03:07.000Z | mysite/homepage/urls.py | jingluomaf/django-mysite | 5a106df6c18e7bd49e02cd29fa3dfe11b5c26ff5 | [
"MIT"
] | null | null | null | from django.urls import path
from . import views
app_name = 'homepage'
urlpatterns = [
path('', views.home, name="home"),
]
| 14.444444 | 38 | 0.669231 |
7976c97ad164e19f7e9b34b0c893248e3beaa9ae | 5,191 | py | Python | tests.py | ment911/entsoe-py | 67cb4386796c242c112512fbf1f50b68723c861a | [
"MIT"
] | 166 | 2018-01-15T19:01:17.000Z | 2022-03-31T10:22:00.000Z | tests.py | ment911/entsoe-py | 67cb4386796c242c112512fbf1f50b68723c861a | [
"MIT"
] | 151 | 2018-01-29T13:42:05.000Z | 2022-03-25T14:15:25.000Z | tests.py | ment911/entsoe-py | 67cb4386796c242c112512fbf1f50b68723c861a | [
"MIT"
] | 120 | 2017-07-18T15:49:56.000Z | 2022-03-16T17:34:10.000Z | import unittest
import pandas as pd
from bs4 import BeautifulSoup
from entsoe import EntsoeRawClient, EntsoePandasClient
from entsoe.exceptions import NoMatchingDataError
from settings import *
class EntsoeRawClientTest(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.client = EntsoeRawClie... | 37.345324 | 76 | 0.648237 |
7976cb13d5d547013aaace1d839c61e194927899 | 1,072 | py | Python | v1/accounts/tests/account.py | nishp77/Validator | 77888fc95db1c69a8a734a6d4eded5fe539ac0b6 | [
"MIT"
] | 43 | 2020-07-12T23:08:35.000Z | 2021-11-28T00:50:49.000Z | v1/accounts/tests/account.py | nishp77/Validator | 77888fc95db1c69a8a734a6d4eded5fe539ac0b6 | [
"MIT"
] | 72 | 2020-07-15T02:33:15.000Z | 2021-10-04T20:52:13.000Z | v1/accounts/tests/account.py | nishp77/Validator | 77888fc95db1c69a8a734a6d4eded5fe539ac0b6 | [
"MIT"
] | 43 | 2020-07-13T08:14:24.000Z | 2021-10-04T17:33:26.000Z | import pytest
from rest_framework.reverse import reverse
from rest_framework.status import HTTP_200_OK
from thenewboston.third_party.pytest.asserts import assert_objects_vs_dicts
def test_accounts_list(client, accounts, django_assert_max_num_queries):
with django_assert_max_num_queries(2):
response = clie... | 28.210526 | 75 | 0.67444 |
7976cc95c2395d8f0d69943e339a0e3add95f523 | 9,934 | py | Python | tensorpack/utils/concurrency.py | layolu/tensorpack | 97360e5b8ca9ce03d8a18b3abef5abfc92cb9907 | [
"Apache-2.0"
] | 1 | 2019-11-21T07:53:39.000Z | 2019-11-21T07:53:39.000Z | tensorpack/utils/concurrency.py | layolu/tensorpack | 97360e5b8ca9ce03d8a18b3abef5abfc92cb9907 | [
"Apache-2.0"
] | null | null | null | tensorpack/utils/concurrency.py | layolu/tensorpack | 97360e5b8ca9ce03d8a18b3abef5abfc92cb9907 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# File: concurrency.py
# Some code taken from zxytim
import sys
import atexit
import bisect
import multiprocessing as mp
import platform
import signal
import threading
import weakref
from contextlib import contextmanager
import six
from six.moves import queue
import subprocess
from . import l... | 27.983099 | 116 | 0.582947 |
7976cebeaef21039e0867cdd86890840d2feeee2 | 1,072 | py | Python | test/utilities.py | stertingen/cross_compile | 3be059293810e910bf9fb8c3b8992995b18a024c | [
"Apache-2.0"
] | 1 | 2020-03-06T02:13:20.000Z | 2020-03-06T02:13:20.000Z | test/utilities.py | stertingen/cross_compile | 3be059293810e910bf9fb8c3b8992995b18a024c | [
"Apache-2.0"
] | null | null | null | test/utilities.py | stertingen/cross_compile | 3be059293810e910bf9fb8c3b8992995b18a024c | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Amazon.com, Inc. or its affiliates. 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 require... | 34.580645 | 86 | 0.736007 |
7976cf709feeebda709aeb13ce191fd194fb8f55 | 420 | py | Python | services/web/utils/db_utils.py | winnyboy5/Python_API_Boiler | 0f153a77be6ffb56c3343c5405b2a4f52b681082 | [
"MIT"
] | 1 | 2020-12-21T15:20:05.000Z | 2020-12-21T15:20:05.000Z | services/web/utils/db_utils.py | winnyboy5/Python_API_Boiler | 0f153a77be6ffb56c3343c5405b2a4f52b681082 | [
"MIT"
] | null | null | null | services/web/utils/db_utils.py | winnyboy5/Python_API_Boiler | 0f153a77be6ffb56c3343c5405b2a4f52b681082 | [
"MIT"
] | null | null | null | from sqlalchemy import Column, Integer, DateTime, func
from sqlalchemy.ext.declarative import declared_attr
class TimestampMixin(object):
id = Column(Integer, primary_key=True)
@declared_attr
def created_at(cls):
return Column(DateTime, server_default=func.now())
@declared_attr
def upda... | 26.25 | 86 | 0.735714 |
7976d268103aefdc2eb4637545fab461cb521db3 | 1,487 | py | Python | workflows/diagnostics/setup.py | ai2cm/fv3net | e62038aee0a97d6207e66baabd8938467838cf51 | [
"MIT"
] | 1 | 2021-12-14T23:43:35.000Z | 2021-12-14T23:43:35.000Z | workflows/diagnostics/setup.py | ai2cm/fv3net | e62038aee0a97d6207e66baabd8938467838cf51 | [
"MIT"
] | 195 | 2021-09-16T05:47:18.000Z | 2022-03-31T22:03:15.000Z | workflows/diagnostics/setup.py | ai2cm/fv3net | e62038aee0a97d6207e66baabd8938467838cf51 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""The setup script."""
from setuptools import setup, find_namespace_packages
install_requirements = [
"scipy>=1.5.0",
"xarray",
"holoviews",
"fsspec",
"gcsfs",
"bokeh",
"h5netcdf",
"cftime",
"intake",
"numpy",
"google-cloud-st... | 24.377049 | 83 | 0.605245 |
7976d2d2cf85dc923194b3eb3fd18638c35a6288 | 446 | py | Python | imputer/migrations/0004_auto_20190328_0243.py | arvkevi/openhumansimputer | f8937329fd15955279d2107a9bfe777f7e2fbdab | [
"MIT"
] | 11 | 2018-12-07T23:11:02.000Z | 2022-01-29T17:34:49.000Z | imputer/migrations/0004_auto_20190328_0243.py | arvkevi/openhumansimputer | f8937329fd15955279d2107a9bfe777f7e2fbdab | [
"MIT"
] | 174 | 2018-08-11T19:45:32.000Z | 2022-03-28T14:16:09.000Z | imputer/migrations/0004_auto_20190328_0243.py | arvkevi/open-humans-imputer | f8937329fd15955279d2107a9bfe777f7e2fbdab | [
"MIT"
] | 3 | 2018-10-02T00:02:39.000Z | 2019-05-28T19:01:35.000Z | # Generated by Django 2.1.7 on 2019-03-28 02:43
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('imputer', '0003_imputermember_data_source_id'),
]
operations = [
migrations.AlterField(
model_name='imputermember',
... | 23.473684 | 85 | 0.627803 |
7976d2e1fbf3f8865fd4ee98d4244d7088ecc794 | 592 | py | Python | src/time_delta.py | yxtay/code-ex | aabcfd4741067a8515fe75441c10853b5724bc01 | [
"MIT"
] | null | null | null | src/time_delta.py | yxtay/code-ex | aabcfd4741067a8515fe75441c10853b5724bc01 | [
"MIT"
] | null | null | null | src/time_delta.py | yxtay/code-ex | aabcfd4741067a8515fe75441c10853b5724bc01 | [
"MIT"
] | null | null | null | #!/bin/python3
import os
from datetime import datetime
# Complete the time_delta function below.
def time_delta(t1, t2):
fmt = "%a %d %b %Y %H:%M:%S %z"
t1_datetime = datetime.strptime(t1, fmt)
t2_datetime = datetime.strptime(t2, fmt)
timedelta = t1_datetime - t2_datetime
return abs(timedelta.tot... | 19.096774 | 47 | 0.609797 |
7976d38578cbc0f3ec8032d241b477363177fcf9 | 1,221 | py | Python | src/GridCal/Engine/Simulations/__init__.py | vineetjnair9/GridCal | 5b63cbae45cbe176b015e5e99164a593f450fe71 | [
"BSD-3-Clause"
] | null | null | null | src/GridCal/Engine/Simulations/__init__.py | vineetjnair9/GridCal | 5b63cbae45cbe176b015e5e99164a593f450fe71 | [
"BSD-3-Clause"
] | null | null | null | src/GridCal/Engine/Simulations/__init__.py | vineetjnair9/GridCal | 5b63cbae45cbe176b015e5e99164a593f450fe71 | [
"BSD-3-Clause"
] | null | null | null | # This file is part of GridCal.
#
# GridCal is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# GridCal is distributed in the hope that... | 43.607143 | 70 | 0.798526 |
7976d43567480d168e94ee7faa1cf76005325f1e | 17,747 | py | Python | faceswap/scripts/train.py | huangjunxiong11/FaceMap | f320ce517edcaa4d9963ad0571e686cbe07fdfbb | [
"MIT"
] | 2 | 2021-08-02T06:45:09.000Z | 2021-08-30T06:35:31.000Z | faceswap/scripts/train.py | huangjunxiong11/FaceMap | f320ce517edcaa4d9963ad0571e686cbe07fdfbb | [
"MIT"
] | 12 | 2020-09-26T00:56:55.000Z | 2022-03-12T00:24:08.000Z | faceswap/scripts/train.py | huangjunxiong11/FaceMap | f320ce517edcaa4d9963ad0571e686cbe07fdfbb | [
"MIT"
] | 1 | 2020-06-16T03:31:24.000Z | 2020-06-16T03:31:24.000Z | #!/usr/bin python3
""" Main entry point to the training process of FaceSwap """
import logging
import os
import sys
from threading import Lock
from time import sleep
import cv2
import tensorflow as tf
from keras.backend.tensorflow_backend import set_session
from lib.image import read_image
from lib.keypress import ... | 40.060948 | 99 | 0.575816 |
7976d6bfd45e9b38f24b5a473c81b7e05c247acf | 485 | py | Python | easy/migrations/0003_auto_20181218_0958.py | tugcanolgun/SWE599 | be11f4ce831684f35660e78c7dc42961e2df7ceb | [
"Apache-2.0"
] | 3 | 2019-01-18T11:37:36.000Z | 2019-04-29T02:46:55.000Z | easy/migrations/0003_auto_20181218_0958.py | tugcanolgun/SWE599 | be11f4ce831684f35660e78c7dc42961e2df7ceb | [
"Apache-2.0"
] | 8 | 2020-02-12T02:28:30.000Z | 2022-03-12T00:07:35.000Z | easy/migrations/0003_auto_20181218_0958.py | sreevani8/hotel-management-system | e37e3ffbbfac61523187d662317e7a5d0ea80c36 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 2.1.4 on 2018-12-18 09:58
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('easy', '0002_auto_20181218_0957'),
]
operations = [
migrations.RemoveField(
model_name='roomservice',
name='floor',
... | 21.086957 | 49 | 0.564948 |
7976d6cd042eddd91bbca29a8d00044991a4a6e6 | 92 | py | Python | common/dataloader.py | elensar92/DETR | ca70e7c488d1ac797fc37e0b4d7e3e6eea3e8623 | [
"MIT"
] | null | null | null | common/dataloader.py | elensar92/DETR | ca70e7c488d1ac797fc37e0b4d7e3e6eea3e8623 | [
"MIT"
] | null | null | null | common/dataloader.py | elensar92/DETR | ca70e7c488d1ac797fc37e0b4d7e3e6eea3e8623 | [
"MIT"
] | null | null | null | from pycocotools import COCO
class DataLoader() :
def __init__(self, types, annotation) : | 23 | 41 | 0.76087 |
7976d999554f9869dc94a8c338040942d5f0d0dd | 7,236 | py | Python | DXFImporter/lib/ezdxf/math/construct3d.py | tapnair/DXFImporter | c86cde0b4420ca7d0c5e3569675acd2d4426667f | [
"MIT"
] | 2 | 2021-07-28T03:52:02.000Z | 2021-07-31T05:08:11.000Z | DXFImporter/lib/ezdxf/math/construct3d.py | tapnair/DXFImporter | c86cde0b4420ca7d0c5e3569675acd2d4426667f | [
"MIT"
] | 1 | 2020-04-28T17:52:26.000Z | 2020-10-07T01:28:56.000Z | DXFImporter/lib/ezdxf/math/construct3d.py | tapnair/DXFImporter | c86cde0b4420ca7d0c5e3569675acd2d4426667f | [
"MIT"
] | 1 | 2021-07-31T05:08:12.000Z | 2021-07-31T05:08:12.000Z | # Copyright (c) 2020, Manfred Moitzi
# License: MIT License
from typing import Sequence, List, Iterable, Union, Tuple
from enum import IntEnum
import math
from .vector import Vector, Vec2
from .matrix33 import Matrix33
class LocationState(IntEnum):
COPLANAR = 0 # all the vertices are within the plane
FRONT =... | 34.62201 | 120 | 0.628109 |
7976dc8db5c5e7e90652d95da9f37190ba7ddb5c | 892 | py | Python | src/library/migrations/0010_bookassignment.py | klown/clusive | 3c89dae967dfe190c2cdf269915c6ace968d1bfb | [
"bzip2-1.0.6"
] | null | null | null | src/library/migrations/0010_bookassignment.py | klown/clusive | 3c89dae967dfe190c2cdf269915c6ace968d1bfb | [
"bzip2-1.0.6"
] | null | null | null | src/library/migrations/0010_bookassignment.py | klown/clusive | 3c89dae967dfe190c2cdf269915c6ace968d1bfb | [
"bzip2-1.0.6"
] | null | null | null | # Generated by Django 2.2.10 on 2020-05-14 18:27
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('roster', '0018_preference'),
('library', '0009_bookversion_new_words'),
]
operations = [
migration... | 31.857143 | 114 | 0.585202 |
7976dd6490ccea162c9754d2c91d1a6592934b52 | 2,129 | py | Python | losses.py | hee9joon/Super-Resolution-GANs | 197ff7ec5939be5e5c823e6354a86d26b8cadeee | [
"MIT"
] | 4 | 2020-12-16T23:08:29.000Z | 2022-02-21T13:20:44.000Z | losses.py | hee9joon/Super-Resolution-GANs | 197ff7ec5939be5e5c823e6354a86d26b8cadeee | [
"MIT"
] | null | null | null | losses.py | hee9joon/Super-Resolution-GANs | 197ff7ec5939be5e5c823e6354a86d26b8cadeee | [
"MIT"
] | 1 | 2021-03-07T06:06:50.000Z | 2021-03-07T06:06:50.000Z | import torch
import torch.nn as nn
from torchvision.models import vgg19
class TVLoss(nn.Module):
"""Total Variation Loss for SRGAN"""
def __init__(self, tv_loss_weight=1):
super(TVLoss, self).__init__()
self.tv_loss_weight = tv_loss_weight
def forward(self, x):
batch_size, channel... | 30.414286 | 82 | 0.573978 |
7976dd77656e135ef8cfb4052bff2610fe5a69b9 | 2,554 | py | Python | connectable/src/DbLiason.py | odeke-em/utils | 9a0ed5bb4a2809d0a442e1a74c71edd9563f84cf | [
"MIT"
] | null | null | null | connectable/src/DbLiason.py | odeke-em/utils | 9a0ed5bb4a2809d0a442e1a74c71edd9563f84cf | [
"MIT"
] | null | null | null | connectable/src/DbLiason.py | odeke-em/utils | 9a0ed5bb4a2809d0a442e1a74c71edd9563f84cf | [
"MIT"
] | null | null | null | #!/usr/bin/python3
# Author: Emmanuel Odeke <odeke@ualberta.ca>
import os
import sys
import json
import collections
pyVersion = sys.hexversion / (1<<24)
if pyVersion >= 3:
import urllib.request as urlReqModule
byteFyer = dict(encoding='utf-8')
else:
import urllib2 as urlReqModule
byte... | 28.065934 | 88 | 0.615505 |
7976dd7c3f14390fb00bc8ab39121b6a686e3039 | 3,328 | py | Python | python/paddle/fluid/tests/unittests/test_beam_search_decode_op.py | limeng357/Paddle | dbd25805c88c48998eb9dc0f4b2ca1fd46326482 | [
"ECL-2.0",
"Apache-2.0"
] | 2 | 2021-07-13T23:15:02.000Z | 2021-11-17T11:06:57.000Z | python/paddle/fluid/tests/unittests/test_beam_search_decode_op.py | limeng357/Paddle | dbd25805c88c48998eb9dc0f4b2ca1fd46326482 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2022-03-29T21:57:12.000Z | 2022-03-29T21:57:12.000Z | python/paddle/fluid/tests/unittests/test_beam_search_decode_op.py | limeng357/Paddle | dbd25805c88c48998eb9dc0f4b2ca1fd46326482 | [
"ECL-2.0",
"Apache-2.0"
] | 2 | 2020-11-04T08:01:39.000Z | 2020-11-06T08:33:28.000Z | # Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | 35.031579 | 79 | 0.579327 |
7976ddb2b1277f7cb0edf5c7b2934146fbc19486 | 11,045 | py | Python | bin/bin_galform/plotLFs-color-mag-trends.py | JohanComparat/nbody-npt-functions | a034db4e5a9b2f87dc42eeb6059c4dd280589e4a | [
"CC0-1.0"
] | 4 | 2017-11-07T02:15:46.000Z | 2022-03-03T01:35:53.000Z | bin/bin_galform/plotLFs-color-mag-trends.py | JohanComparat/nbody-npt-functions | a034db4e5a9b2f87dc42eeb6059c4dd280589e4a | [
"CC0-1.0"
] | null | null | null | bin/bin_galform/plotLFs-color-mag-trends.py | JohanComparat/nbody-npt-functions | a034db4e5a9b2f87dc42eeb6059c4dd280589e4a | [
"CC0-1.0"
] | 2 | 2020-08-12T14:26:38.000Z | 2021-09-14T06:08:58.000Z | #! /usr/bin/env python
"""
This script produces quality plots to check that the LFs are fine compared to simumlations.
"""
import sys
import os
from os.path import join
data_dir = os.environ['DATA_DIR']
import glob
from lib_plot import *
#from lineListAir import *
SNlim = 5
# "D:\data\LF-O\LFmodels\data\trends_colo... | 28.61399 | 111 | 0.654957 |
7976deb9499e925b6762fdc7875628758758852d | 1,947 | py | Python | quest-ai/back/ai/display.py | Manfred-Madelaine-pro/quest-ai | edef99fdda89ce3698a927130c2ae6cdb04fe6c3 | [
"MIT"
] | 1 | 2021-02-05T01:59:05.000Z | 2021-02-05T01:59:05.000Z | quest-ai/back/ai/display.py | Manfred-Madelaine-pro/quest-ai | edef99fdda89ce3698a927130c2ae6cdb04fe6c3 | [
"MIT"
] | null | null | null | quest-ai/back/ai/display.py | Manfred-Madelaine-pro/quest-ai | edef99fdda89ce3698a927130c2ae6cdb04fe6c3 | [
"MIT"
] | null | null | null |
try:
import matrix
except ImportError:
try:
from ai import matrix
except ImportError:
from back.ai import matrix
def h_flat_arrangement(*args):
txt = ''
for mat in args:
if len(txt) > 0 : txt += '\n'
txt += mat.get_name() + '\t: '
for r in range(mat.nb_row):
for c in range(mat.nb_... | 24.64557 | 65 | 0.595788 |
7976def8635258cf26cd2631fa81db4122cc334e | 131,382 | py | Python | src/azure-cli/azure/cli/command_modules/resource/custom.py | MonikaReddy-MSFT/azure-cli | bd3dfd50aa6c327e04786dc12199ab2f13f3da52 | [
"MIT"
] | null | null | null | src/azure-cli/azure/cli/command_modules/resource/custom.py | MonikaReddy-MSFT/azure-cli | bd3dfd50aa6c327e04786dc12199ab2f13f3da52 | [
"MIT"
] | null | null | null | src/azure-cli/azure/cli/command_modules/resource/custom.py | MonikaReddy-MSFT/azure-cli | bd3dfd50aa6c327e04786dc12199ab2f13f3da52 | [
"MIT"
] | null | null | null | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 48.284454 | 197 | 0.659512 |
7976df4d891120755af530b69ba40a1a0dc52049 | 4,085 | py | Python | app/gws/core/debug.py | gbd-consult/gbd-websuite | 7212f41081c04614fdb4641e902d4de3424da8c5 | [
"Apache-2.0"
] | 3 | 2020-07-24T10:10:18.000Z | 2022-03-16T10:22:04.000Z | app/gws/core/debug.py | gbd-consult/gbd-websuite | 7212f41081c04614fdb4641e902d4de3424da8c5 | [
"Apache-2.0"
] | 28 | 2020-03-03T17:35:58.000Z | 2021-07-12T12:05:47.000Z | app/gws/core/debug.py | gbd-consult/gbd-websuite | 7212f41081c04614fdb4641e902d4de3424da8c5 | [
"Apache-2.0"
] | 1 | 2021-02-22T14:32:10.000Z | 2021-02-22T14:32:10.000Z | """Debuggging tools"""
import re
import socket
import sys
import time
import traceback
import uuid
from . import log
def inspect(arg, max_depth=1, all_props=False):
"""Inspect the argument upto the given depth"""
yield from _dump(arg, None, 0, max_depth or 1, all_props, [])
def p(*args, lines=False, stac... | 23.210227 | 95 | 0.56989 |
7976e0ba9d84ecf366da5ac7c032969494a4b59f | 543 | py | Python | ABC/abc151-abc200/abc179/e/main.py | KATO-Hiro/AtCoder | cbbdb18e95110b604728a54aed83a6ed6b993fde | [
"CC0-1.0"
] | 2 | 2020-06-12T09:54:23.000Z | 2021-05-04T01:34:07.000Z | ABC/abc151-abc200/abc179/e/main.py | KATO-Hiro/AtCoder | cbbdb18e95110b604728a54aed83a6ed6b993fde | [
"CC0-1.0"
] | 961 | 2020-06-23T07:26:22.000Z | 2022-03-31T21:34:52.000Z | ABC/abc151-abc200/abc179/e/main.py | KATO-Hiro/AtCoder | cbbdb18e95110b604728a54aed83a6ed6b993fde | [
"CC0-1.0"
] | null | null | null | # -*- coding: utf-8 -*-
def main():
n, x, m = map(int, input().split())
ans = x
a = x
d = dict()
for i in range(2 * m + 1):
a = (a ** 2) % m
if a not in d.keys():
d[a] = [i + 1]
else:
d[a].append(i + 1)
for key, value in d.items():
if ... | 16.96875 | 49 | 0.377532 |
7976e21414907746d3391f9ef0301e19ec37d825 | 5,356 | py | Python | notebooks/SeanCarving.py | franciscovargas/TeviotDataScienceGame | 77bdffb87b2a25490ca175b3a2f96459067e4ccb | [
"MIT"
] | null | null | null | notebooks/SeanCarving.py | franciscovargas/TeviotDataScienceGame | 77bdffb87b2a25490ca175b3a2f96459067e4ccb | [
"MIT"
] | null | null | null | notebooks/SeanCarving.py | franciscovargas/TeviotDataScienceGame | 77bdffb87b2a25490ca175b3a2f96459067e4ccb | [
"MIT"
] | null | null | null |
# coding: utf-8
# In[1]:
from PIL import Image
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.colors import LogNorm
from sklearn import mixture
import scipy
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.colors import LogNorm
from sklearn import mixture
from skimage import ... | 25.14554 | 100 | 0.692308 |
7976e2ad04d8aa79c8f0062d31da3a68d2c7da1a | 997 | py | Python | Python Web/tiantianshop/tiantianshop/urls.py | meidong163/python- | 06abcfa7bef90b8aba23834777c04dadfa9f61ce | [
"MIT"
] | null | null | null | Python Web/tiantianshop/tiantianshop/urls.py | meidong163/python- | 06abcfa7bef90b8aba23834777c04dadfa9f61ce | [
"MIT"
] | null | null | null | Python Web/tiantianshop/tiantianshop/urls.py | meidong163/python- | 06abcfa7bef90b8aba23834777c04dadfa9f61ce | [
"MIT"
] | null | null | null | """tiantianshop URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-... | 38.346154 | 77 | 0.699097 |
7976e30b218b2ba7a1ee75bb27cc20a64e9ef810 | 7,425 | py | Python | higra/hierarchy/constrained_connectivity_hierarchy.py | deisemaia/Higra | 82cb78b606a383f3961faa882457a9a987f802e0 | [
"CECILL-B"
] | 64 | 2019-08-18T19:23:23.000Z | 2022-03-21T04:15:04.000Z | higra/hierarchy/constrained_connectivity_hierarchy.py | deisemaia/Higra | 82cb78b606a383f3961faa882457a9a987f802e0 | [
"CECILL-B"
] | 120 | 2019-08-16T09:10:35.000Z | 2022-03-17T09:42:58.000Z | higra/hierarchy/constrained_connectivity_hierarchy.py | deisemaia/Higra | 82cb78b606a383f3961faa882457a9a987f802e0 | [
"CECILL-B"
] | 12 | 2019-10-04T07:35:55.000Z | 2021-01-10T19:59:11.000Z | ############################################################################
# Copyright ESIEE Paris (2018) #
# #
# Contributor(s) : Benjamin Perret #
# ... | 54.19708 | 172 | 0.664377 |
7976e34e436f4b36e722fd1fe4c8eda4b3ff5d59 | 189 | py | Python | katas/kyu_8/grasshopper_terminal_game_1.py | the-zebulan/CodeWars | 1eafd1247d60955a5dfb63e4882e8ce86019f43a | [
"MIT"
] | 40 | 2016-03-09T12:26:20.000Z | 2022-03-23T08:44:51.000Z | katas/kyu_8/grasshopper_terminal_game_1.py | akalynych/CodeWars | 1eafd1247d60955a5dfb63e4882e8ce86019f43a | [
"MIT"
] | null | null | null | katas/kyu_8/grasshopper_terminal_game_1.py | akalynych/CodeWars | 1eafd1247d60955a5dfb63e4882e8ce86019f43a | [
"MIT"
] | 36 | 2016-11-07T19:59:58.000Z | 2022-03-31T11:18:27.000Z | class Hero(object):
def __init__(self, name='Hero'):
self.damage = 5
self.experience = 0
self.health = 100
self.name = name
self.position = '00'
| 23.625 | 36 | 0.544974 |
7976e38775a481a3447cda9c9e6c90c055c79419 | 7,196 | py | Python | research/slim/datasets/download_and_convert_flowers.py | 873040/Abhishek | 2ddd716e66bc5cc6e6f0787508dd07da0e02e75a | [
"Apache-2.0"
] | 3,255 | 2016-08-18T17:53:27.000Z | 2022-03-29T19:53:43.000Z | research/slim/datasets/download_and_convert_flowers.py | 873040/Abhishek | 2ddd716e66bc5cc6e6f0787508dd07da0e02e75a | [
"Apache-2.0"
] | 146 | 2020-06-16T21:13:03.000Z | 2022-03-29T02:31:41.000Z | research/slim/datasets/download_and_convert_flowers.py | 873040/Abhishek | 2ddd716e66bc5cc6e6f0787508dd07da0e02e75a | [
"Apache-2.0"
] | 2,580 | 2017-05-14T14:33:41.000Z | 2022-03-31T15:04:14.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... | 33.943396 | 80 | 0.722207 |
7976e434d0736a075c12d55a97af406acb669dfd | 128 | py | Python | setup.py | peteut/ramda.py | d315a9717ebd639366bf3fe26bad9e3d08ec3c49 | [
"MIT"
] | null | null | null | setup.py | peteut/ramda.py | d315a9717ebd639366bf3fe26bad9e3d08ec3c49 | [
"MIT"
] | 12 | 2017-09-03T15:25:48.000Z | 2020-04-11T15:22:01.000Z | setup.py | peteut/ramda.py | d315a9717ebd639366bf3fe26bad9e3d08ec3c49 | [
"MIT"
] | 1 | 2020-04-11T07:36:47.000Z | 2020-04-11T07:36:47.000Z | from setuptools import setup, find_packages
setup(setup_requires=["pbr"], pbr=True,
packages=find_packages(where="src"))
| 25.6 | 43 | 0.75 |
7976e7903e33b7ab5fe87c7a6640340af42d0a93 | 14,428 | py | Python | drift_dac/tests/test.py | dataiku-research/performance_prediction_under_shift | 6ca75afc5d0925a7c463370c5603a0b85fa5d0fc | [
"Apache-2.0"
] | null | null | null | drift_dac/tests/test.py | dataiku-research/performance_prediction_under_shift | 6ca75afc5d0925a7c463370c5603a0b85fa5d0fc | [
"Apache-2.0"
] | null | null | null | drift_dac/tests/test.py | dataiku-research/performance_prediction_under_shift | 6ca75afc5d0925a7c463370c5603a0b85fa5d0fc | [
"Apache-2.0"
] | null | null | null | from drift_dac.tests.perturbations_tests_utils import *
from drift_dac.perturbation_shared_utils import PerturbationConstants
from drift_dac.drift_metrics import compute_drift_metrics
from drift_dac.domain_classifier import DomainClassifier, MultiDomainClassifier, DomainClassifierModel
from sklearn.model_selection imp... | 39.313351 | 119 | 0.698849 |
7976e7df0c7c7fddb25a795a5f0e6ab08002b451 | 446 | py | Python | criminals/admin.py | Three-Dev-Musketeers/Mumbai_Police | 293fbc1d81db459c23649c9c6b1eef8c38da1939 | [
"MIT"
] | 5 | 2021-02-19T20:37:35.000Z | 2021-12-19T06:41:50.000Z | criminals/admin.py | Divesh2201/Mumbai_Police | dfabf8494de2c790178541ee20d37d3002ca12af | [
"MIT"
] | 1 | 2021-10-04T17:37:51.000Z | 2021-10-05T10:50:36.000Z | criminals/admin.py | Divesh2201/Mumbai_Police | dfabf8494de2c790178541ee20d37d3002ca12af | [
"MIT"
] | 4 | 2021-03-05T05:44:20.000Z | 2021-04-25T17:23:16.000Z | from django.contrib import admin
from .models import criminalsInfo
# Register your models here.
class criminalsInfoAdmin(admin.ModelAdmin):
list_display = ['firstname','lastname','crime','current_status','date',]
ordering = ['firstname','lastname']
search_fields = ('firstname','lastname',"crime","curren... | 27.875 | 76 | 0.737668 |
7976e8093dd91e29b9ad24ed88e918d0be3a6fa3 | 96 | py | Python | src/courses/apps.py | GiomarOsorio/another-e-learning-platform | 5cfc76420eb3466691f5187c915c179afb13199a | [
"MIT"
] | null | null | null | src/courses/apps.py | GiomarOsorio/another-e-learning-platform | 5cfc76420eb3466691f5187c915c179afb13199a | [
"MIT"
] | 8 | 2020-06-25T22:16:20.000Z | 2022-03-12T00:39:27.000Z | src/courses/apps.py | GiomarOsorio/another-e-learning-platform | 5cfc76420eb3466691f5187c915c179afb13199a | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class CoursesConfig(AppConfig):
name = "courses"
| 13.714286 | 34 | 0.697917 |
7976e8ec892a616e442a01ee749b16aeafcea132 | 282 | py | Python | configs/hpt-pretrain/resisc-ucmerced/moco_v2_800ep_resisc_5000it_basetrain/50000-iters.py | Berkeley-Data/OpenSelfSup | 221191b88d891de57725b149caf237ffef72e529 | [
"Apache-2.0"
] | null | null | null | configs/hpt-pretrain/resisc-ucmerced/moco_v2_800ep_resisc_5000it_basetrain/50000-iters.py | Berkeley-Data/OpenSelfSup | 221191b88d891de57725b149caf237ffef72e529 | [
"Apache-2.0"
] | 6 | 2021-03-11T05:35:54.000Z | 2021-04-03T22:25:11.000Z | configs/hpt-pretrain/resisc-ucmerced/moco_v2_800ep_resisc_5000it_basetrain/50000-iters.py | Berkeley-Data/OpenSelfSup | 221191b88d891de57725b149caf237ffef72e529 | [
"Apache-2.0"
] | 1 | 2021-07-04T00:47:46.000Z | 2021-07-04T00:47:46.000Z | _base_="../base-resisc-ucmerced-config.py"
# this will merge with the parent
model=dict(pretrained='work_dirs/hpt-pretrain/resisc/moco_v2_800ep_basetrain/5000-iters/moco_v2_800ep_resisc_5000it.pth')
# epoch related
total_iters=50000
checkpoint_config = dict(interval=total_iters)
| 31.333333 | 121 | 0.826241 |
7976ea7fbbd9b5494eda4b6682bfeadbbf33f6aa | 2,014 | py | Python | lunar_python/SolarSeason.py | nqiu/lunar-python | 479990b68011fc33e4e48bffed98f1fd2714b2ac | [
"MIT"
] | 61 | 2020-07-16T00:53:24.000Z | 2022-03-28T14:21:34.000Z | lunar_python/SolarSeason.py | nqiu/lunar-python | 479990b68011fc33e4e48bffed98f1fd2714b2ac | [
"MIT"
] | 4 | 2020-09-23T08:03:40.000Z | 2022-02-21T06:09:08.000Z | lunar_python/SolarSeason.py | nqiu/lunar-python | 479990b68011fc33e4e48bffed98f1fd2714b2ac | [
"MIT"
] | 25 | 2020-05-25T00:26:25.000Z | 2022-03-29T03:13:54.000Z | # -*- coding: utf-8 -*-
from math import ceil
from . import SolarMonth
class SolarSeason:
"""
阳历季度
"""
MONTH_COUNT = 3
def __init__(self, year, month):
self.__year = year
self.__month = month
@staticmethod
def fromDate(date):
return SolarSeason(date.year, date.m... | 23.694118 | 98 | 0.516882 |
7976eabb831d291033dd0b46d2d22d3ad1f0c2d8 | 11,438 | py | Python | pymc3/math.py | hyosubkim/pymc3 | 4bba0e223af299b3e766bf7f579e3085b72124da | [
"Apache-2.0"
] | 3 | 2020-10-06T21:07:30.000Z | 2021-03-04T11:40:17.000Z | pymc3/math.py | hyosubkim/pymc3 | 4bba0e223af299b3e766bf7f579e3085b72124da | [
"Apache-2.0"
] | null | null | null | pymc3/math.py | hyosubkim/pymc3 | 4bba0e223af299b3e766bf7f579e3085b72124da | [
"Apache-2.0"
] | 3 | 2019-09-09T13:09:32.000Z | 2021-09-12T14:37:51.000Z | # Copyright 2020 The PyMC Developers
#
# 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... | 30.582888 | 94 | 0.614443 |
7976eb3ce23976fe84cf24ee9de7e642ddea9387 | 762 | py | Python | lazysignup/tests/views.py | yoccodog/django-lazysignup | 18d273b97083c8e2a21e54bf326f41c0b4e231fb | [
"BSD-3-Clause"
] | null | null | null | lazysignup/tests/views.py | yoccodog/django-lazysignup | 18d273b97083c8e2a21e54bf326f41c0b4e231fb | [
"BSD-3-Clause"
] | null | null | null | lazysignup/tests/views.py | yoccodog/django-lazysignup | 18d273b97083c8e2a21e54bf326f41c0b4e231fb | [
"BSD-3-Clause"
] | 1 | 2018-06-22T13:07:34.000Z | 2018-06-22T13:07:34.000Z | from django.http import HttpResponse
from lazysignup.decorators import allow_lazy_user, require_lazy_user, require_nonlazy_user
def view(request):
r = HttpResponse()
try:
if request.user.is_authenticated():
r.status_code = 500
except TypeError:
if request.user.is_authenticated:... | 22.411765 | 90 | 0.717848 |
7976ebc8997aafe6fd94fbd8fed94a6c4d8ee9c3 | 3,991 | py | Python | datadog/dogshell/__init__.py | cclauss/datadogpy | ec571f6593c983c0228fd7b6019bced1c5e7fc93 | [
"BSD-3-Clause"
] | 1 | 2021-03-26T09:11:30.000Z | 2021-03-26T09:11:30.000Z | datadog/dogshell/__init__.py | cclauss/datadogpy | ec571f6593c983c0228fd7b6019bced1c5e7fc93 | [
"BSD-3-Clause"
] | null | null | null | datadog/dogshell/__init__.py | cclauss/datadogpy | ec571f6593c983c0228fd7b6019bced1c5e7fc93 | [
"BSD-3-Clause"
] | null | null | null | # Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License.
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2015-Present Datadog, Inc
# stdlib
import os
import warnings
import sys
# 3p
import argparse
# datadog
from dat... | 37.650943 | 119 | 0.737409 |
7976ebe0cc48f0037b896275fbaf18a24cfdd682 | 1,295 | py | Python | question_bank/letter-tile-possibilities/letter-tile-possibilities.py | yatengLG/leetcode-python | 5d48aecb578c86d69835368fad3d9cc21961c226 | [
"Apache-2.0"
] | 9 | 2020-08-12T10:01:00.000Z | 2022-01-05T04:37:48.000Z | question_bank/letter-tile-possibilities/letter-tile-possibilities.py | yatengLG/leetcode-python | 5d48aecb578c86d69835368fad3d9cc21961c226 | [
"Apache-2.0"
] | 1 | 2021-02-16T10:19:31.000Z | 2021-02-16T10:19:31.000Z | question_bank/letter-tile-possibilities/letter-tile-possibilities.py | yatengLG/leetcode-python | 5d48aecb578c86d69835368fad3d9cc21961c226 | [
"Apache-2.0"
] | 4 | 2020-08-12T10:13:31.000Z | 2021-11-05T01:26:58.000Z | # -*- coding: utf-8 -*-
# @Author : LG
"""
执行用时:120 ms, 在所有 Python3 提交中击败了63.74% 的用户
内存消耗:20.5 MB, 在所有 Python3 提交中击败了14.45% 的用户
解题思路:
参考了思路:https://leetcode-cn.com/problems/letter-tile-possibilities/solution/hui-su-suan-fa-python-dai-ma-by-liweiwei1419/
这哥们写的是真的棒!
例: 'AAB'
A B AA AB BA A... | 32.375 | 123 | 0.53668 |
7976f086070c97be7e7d8014d931380aee3ad4cd | 18,640 | py | Python | scripts/evaluate_habitat.py | corl19paper273/midlevel-visual-priors | 9dbfeabf072ee9c841fefb1f854c8bc6ca8f1cc1 | [
"MIT"
] | null | null | null | scripts/evaluate_habitat.py | corl19paper273/midlevel-visual-priors | 9dbfeabf072ee9c841fefb1f854c8bc6ca8f1cc1 | [
"MIT"
] | 7 | 2019-12-16T21:58:34.000Z | 2022-02-10T00:16:29.000Z | scripts/evaluate_habitat.py | corl19paper273/midlevel-visual-priors | 9dbfeabf072ee9c841fefb1f854c8bc6ca8f1cc1 | [
"MIT"
] | null | null | null | # used for habitat challenges
# CHALLENGE_CONFIG_FILE=/root/perception_module/habitat-api/configs/tasks/pointnav_gibson_val_mini.yaml python -m scripts.evaluate_habitat /mnt/logdir/normal_encoding_multienv_map
# not sure on ^
# python -m scripts.evaluate_habitat /mnt/logdir/normal_encoding_multienv_map 1
import copy
f... | 47.070707 | 292 | 0.614646 |
7976f1055e26936d39c3f5a3f96886a541a291aa | 2,704 | py | Python | udm-bildungslogin/usr/lib/python2.7/dist-packages/univention/udm/modules/bildungslogin_license.py | univention/bildungslogin | 29bebe858a5445dd5566aad594b33b9dd716eca4 | [
"MIT"
] | null | null | null | udm-bildungslogin/usr/lib/python2.7/dist-packages/univention/udm/modules/bildungslogin_license.py | univention/bildungslogin | 29bebe858a5445dd5566aad594b33b9dd716eca4 | [
"MIT"
] | null | null | null | udm-bildungslogin/usr/lib/python2.7/dist-packages/univention/udm/modules/bildungslogin_license.py | univention/bildungslogin | 29bebe858a5445dd5566aad594b33b9dd716eca4 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright 2021 Univention GmbH
#
# https://www.univention.de/
#
# All rights reserved.
#
# The source code of this program is made available
# under the terms of the GNU Affero General Public License version 3
# (GNU AGPL V3) as published by the Free Software Foundation.
#
# Binary versions ... | 32.578313 | 80 | 0.75037 |
7976f173de84e7fa5542229167373a575700b629 | 27,966 | py | Python | rex/exploit/cgc/cgc_exploit.py | tiedaoxiaotubie/rex | 049bbce3ab2717cbb4d2f0fc10fe8c0433b39c1d | [
"BSD-2-Clause"
] | null | null | null | rex/exploit/cgc/cgc_exploit.py | tiedaoxiaotubie/rex | 049bbce3ab2717cbb4d2f0fc10fe8c0433b39c1d | [
"BSD-2-Clause"
] | null | null | null | rex/exploit/cgc/cgc_exploit.py | tiedaoxiaotubie/rex | 049bbce3ab2717cbb4d2f0fc10fe8c0433b39c1d | [
"BSD-2-Clause"
] | 1 | 2020-09-16T07:07:28.000Z | 2020-09-16T07:07:28.000Z | import os
import claripy
from rex.exploit import Exploit
from povsim import CGCPovSimulator
import tempfile
import compilerex
from angr.state_plugins.trace_additions import ChallRespInfo
import logging
l = logging.getLogger("rex.exploit.cgc.cgc_exploit")
l.setLevel("DEBUG")
def _get_byte(var_name):
## XXX TODO F... | 42.56621 | 151 | 0.600443 |
7976f1beb929c1d27773cbb54a403789f6a793b2 | 16,132 | py | Python | v6.0.6/certificate/fortios_certificate_local.py | fortinet-solutions-cse/ansible_fgt_modules | c45fba49258d7c9705e7a8fd9c2a09ea4c8a4719 | [
"Apache-2.0"
] | 14 | 2018-09-25T20:35:25.000Z | 2021-07-14T04:30:54.000Z | v6.0.6/certificate/fortios_certificate_local.py | fortinet-solutions-cse/ansible_fgt_modules | c45fba49258d7c9705e7a8fd9c2a09ea4c8a4719 | [
"Apache-2.0"
] | 32 | 2018-10-09T04:13:42.000Z | 2020-05-11T07:20:28.000Z | v6.0.6/certificate/fortios_certificate_local.py | fortinet-solutions-cse/ansible_fgt_modules | c45fba49258d7c9705e7a8fd9c2a09ea4c8a4719 | [
"Apache-2.0"
] | 11 | 2018-10-09T00:14:53.000Z | 2021-11-03T10:54:09.000Z | #!/usr/bin/python
from __future__ import (absolute_import, division, print_function)
# Copyright 2019 Fortinet, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the Lic... | 33.538462 | 119 | 0.546987 |
7976f1c8965b142a92ebe4219c15ac9f2d5ee4a0 | 8,878 | py | Python | tools/accuracy_checker/accuracy_checker/launcher/tf_launcher.py | evgeny-izutov/open_model_zoo | 2cd6145ef342fc9b7ccf32676af73f4a1cb8d9ba | [
"Apache-2.0"
] | null | null | null | tools/accuracy_checker/accuracy_checker/launcher/tf_launcher.py | evgeny-izutov/open_model_zoo | 2cd6145ef342fc9b7ccf32676af73f4a1cb8d9ba | [
"Apache-2.0"
] | null | null | null | tools/accuracy_checker/accuracy_checker/launcher/tf_launcher.py | evgeny-izutov/open_model_zoo | 2cd6145ef342fc9b7ccf32676af73f4a1cb8d9ba | [
"Apache-2.0"
] | null | null | null | """
Copyright (c) 2018-2020 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in wri... | 39.990991 | 120 | 0.624916 |
7976f2d61e45b36e19a8b6db93e603ded76a9d57 | 188 | py | Python | tipos de datos/dictionary3.py | gabys12/portafolio-fundamento-de-programacion | c9b47f32e885ed6ae80b14133a609798ea034e19 | [
"CNRI-Python"
] | null | null | null | tipos de datos/dictionary3.py | gabys12/portafolio-fundamento-de-programacion | c9b47f32e885ed6ae80b14133a609798ea034e19 | [
"CNRI-Python"
] | null | null | null | tipos de datos/dictionary3.py | gabys12/portafolio-fundamento-de-programacion | c9b47f32e885ed6ae80b14133a609798ea034e19 | [
"CNRI-Python"
] | null | null | null | import random
clientes = ["Alex","Bob","Carol","Dave","Flow","Katie","Nate"]
diccionario_descuentos = {cliente:random.randint(1,100) for cliente in clientes}
print(diccionario_descuentos)
| 37.6 | 80 | 0.755319 |
7976f2e1d62a3703d0047112901cdc9ae21ccd36 | 3,043 | py | Python | apps/posts/models.py | jesse-zwd/ins-backend | 247954682fac11a06c996b2bf9e96c4f6bbaca36 | [
"PostgreSQL",
"MIT"
] | null | null | null | apps/posts/models.py | jesse-zwd/ins-backend | 247954682fac11a06c996b2bf9e96c4f6bbaca36 | [
"PostgreSQL",
"MIT"
] | null | null | null | apps/posts/models.py | jesse-zwd/ins-backend | 247954682fac11a06c996b2bf9e96c4f6bbaca36 | [
"PostgreSQL",
"MIT"
] | null | null | null | from datetime import datetime
from django.db import models
from django.contrib.auth import get_user_model
User = get_user_model()
# Create your models here.
class Post(models.Model):
user = models.ForeignKey(User, related_name='posts', on_delete=models.CASCADE)
caption = models.CharField(max_length=200, de... | 34.191011 | 117 | 0.721656 |
7976f311d6c7c6afa704680d3ed1cd449876f4e3 | 1,786 | py | Python | maths/prime_check.py | TeddyFirman/Algorithm_Python | edbd50a97a62c2beb2a187e4c411c677aa43115e | [
"MIT"
] | null | null | null | maths/prime_check.py | TeddyFirman/Algorithm_Python | edbd50a97a62c2beb2a187e4c411c677aa43115e | [
"MIT"
] | null | null | null | maths/prime_check.py | TeddyFirman/Algorithm_Python | edbd50a97a62c2beb2a187e4c411c677aa43115e | [
"MIT"
] | null | null | null | """Prime Check."""
import math
import unittest
def prime_check(number: int) -> bool:
"""Checks to see if a number is a prime.
A number is prime if it has exactly two factors: 1 and itself.
"""
if 1 < number < 4:
# 2 and 3 are primes
return True
elif number < 2 or ... | 30.271186 | 85 | 0.594065 |
7976f3fb3c39c25b6712ae3873d8a49593bb31f3 | 651 | py | Python | leetcode.py/LongestCommonPrefix.py | pikeszfish/LeetCode | 40f4b58c60530d73b28e39323a17ed400f0d91cd | [
"MIT"
] | null | null | null | leetcode.py/LongestCommonPrefix.py | pikeszfish/LeetCode | 40f4b58c60530d73b28e39323a17ed400f0d91cd | [
"MIT"
] | null | null | null | leetcode.py/LongestCommonPrefix.py | pikeszfish/LeetCode | 40f4b58c60530d73b28e39323a17ed400f0d91cd | [
"MIT"
] | null | null | null | class Solution:
# @return a string
def longestCommonPrefix(self, strs):
if not strs:
return ''
strs.sort(cmp=lambda a, b: len(a)-len(b))
s = strs[0]
for i in range(1, len(strs)):
if strs[i].startswith(s):
continue
else... | 28.304348 | 50 | 0.380952 |
7976f45712c30ca1e34ef18fb623d8f41febd234 | 12,686 | py | Python | a10_neutron_lbaas/neutron_ext/db/certificate_db.py | hthompson6/a10-neutron-lbaas | f1639758cd3abcc6c86c8e6b64dcb0397c359621 | [
"Apache-2.0"
] | 10 | 2015-09-15T05:16:15.000Z | 2020-03-18T02:34:39.000Z | a10_neutron_lbaas/neutron_ext/db/certificate_db.py | hthompson6/a10-neutron-lbaas | f1639758cd3abcc6c86c8e6b64dcb0397c359621 | [
"Apache-2.0"
] | 334 | 2015-02-11T23:45:00.000Z | 2020-02-28T08:58:51.000Z | a10_neutron_lbaas/neutron_ext/db/certificate_db.py | hthompson6/a10-neutron-lbaas | f1639758cd3abcc6c86c8e6b64dcb0397c359621 | [
"Apache-2.0"
] | 24 | 2015-01-13T21:14:45.000Z | 2021-06-02T17:22:14.000Z | # Copyright (C) 2016, A10 Networks 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 requ... | 45.145907 | 100 | 0.676415 |
7976f45b4afe8741e396e95c637de992c456093a | 2,035 | py | Python | tools/save_waveform_diff.py | ml-postech/LISA | 4f3c1cd7e56d6d7b107a587152cd703663cfa4c4 | [
"BSD-3-Clause"
] | null | null | null | tools/save_waveform_diff.py | ml-postech/LISA | 4f3c1cd7e56d6d7b107a587152cd703663cfa4c4 | [
"BSD-3-Clause"
] | null | null | null | tools/save_waveform_diff.py | ml-postech/LISA | 4f3c1cd7e56d6d7b107a587152cd703663cfa4c4 | [
"BSD-3-Clause"
] | 1 | 2022-03-31T16:06:22.000Z | 2022-03-31T16:06:22.000Z | import argparse
import os
import torch
import torchaudio
import torchaudio.functional as F
import torchaudio.transforms as T
import librosa
import matplotlib.pyplot as plt
def plot_waveform_diff(original,pred, sample_rate, filename, title="Waveform", xlim=None, ylim=None):
original = original.numpy()
pred = pre... | 29.071429 | 101 | 0.685995 |
7976f47cc5d5247d6860fcc62d66246a052023a1 | 155 | py | Python | giotto/__init__.py | gtauzin/giotto-learn | 4cbd981f8113d44a80d68570a472d5a58245535b | [
"Apache-2.0"
] | 1 | 2020-03-27T12:09:09.000Z | 2020-03-27T12:09:09.000Z | giotto/__init__.py | marta-l2f/giotto-learn | 7e693b76e03ea422a3046fc8931f0be6b02fab64 | [
"Apache-2.0"
] | null | null | null | giotto/__init__.py | marta-l2f/giotto-learn | 7e693b76e03ea422a3046fc8931f0be6b02fab64 | [
"Apache-2.0"
] | null | null | null | from ._version import __version__
__all__ = ['homology', 'time_series', 'graphs', 'diagrams', 'externals',
'meta_transformers', '__version__']
| 31 | 72 | 0.683871 |
7976f4eac2519f27f87f4a5f58c3c575e279beaf | 2,738 | py | Python | cddd/model_helper.py | leelasd/ChemMORT | 9ade488d2da9207b88f2ebdf2ffc9a5cf20bae4c | [
"MIT"
] | 1 | 2021-02-19T09:13:01.000Z | 2021-02-19T09:13:01.000Z | cddd/model_helper.py | leelasd/ChemMORT | 9ade488d2da9207b88f2ebdf2ffc9a5cf20bae4c | [
"MIT"
] | null | null | null | cddd/model_helper.py | leelasd/ChemMORT | 9ade488d2da9207b88f2ebdf2ffc9a5cf20bae4c | [
"MIT"
] | null | null | null | """Helper functions that build the translation model with a corroponding graph and session."""
from collections import namedtuple
import tensorflow as tf
from cddd import models
from cddd import input_pipeline
def build_models(hparams, modes=["TRAIN", "EVAL", "ENCODE"]):
"""Helper function to build a translation ... | 42.78125 | 94 | 0.638787 |
7976f5ecbb4c596f4042706a368cc577b657fde7 | 1,358 | py | Python | demo_app/example_app/models.py | Virako/django-datatable-view | 6fda8318f146fbe8b45b8f89b0c221641975841e | [
"Apache-2.0"
] | null | null | null | demo_app/example_app/models.py | Virako/django-datatable-view | 6fda8318f146fbe8b45b8f89b0c221641975841e | [
"Apache-2.0"
] | null | null | null | demo_app/example_app/models.py | Virako/django-datatable-view | 6fda8318f146fbe8b45b8f89b0c221641975841e | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from django.db import models
class Blog(models.Model):
name = models.CharField(max_length=100)
tagline = models.TextField()
def __str__(self):
return self.name
def get_absolute_url(self):
return '#blog-{pk}'.format(pk=self.pk)
class Author(models.Model):
... | 24.690909 | 62 | 0.66053 |
7976f68d334df5dc52670bc945c86c1b0421bce0 | 11,530 | py | Python | majora2/serializers.py | CLIMB-COVID/majora2 | 46ea1809a61e4a768f8cbacaf54cba5c4d82e1f2 | [
"MIT"
] | null | null | null | majora2/serializers.py | CLIMB-COVID/majora2 | 46ea1809a61e4a768f8cbacaf54cba5c4d82e1f2 | [
"MIT"
] | 1 | 2022-02-15T15:22:32.000Z | 2022-02-15T15:22:32.000Z | majora2/serializers.py | CLIMB-COVID/majora2 | 46ea1809a61e4a768f8cbacaf54cba5c4d82e1f2 | [
"MIT"
] | 1 | 2022-02-17T11:05:06.000Z | 2022-02-17T11:05:06.000Z | import serpy
from majora2 import models # gross
### SERPY
class ArtifactSerializer(serpy.Serializer):
id = serpy.StrField()
dice_name = serpy.StrField()
artifact_kind = serpy.StrField()
metadata = serpy.MethodField('get_metadata_as_struct')
metrics = serpy.MethodField('get_metrics_as_struct')
... | 44.007634 | 134 | 0.722376 |
7976f6f8d7561065d069d8d50131d0c6196f3296 | 1,080 | py | Python | alipay/aop/api/response/AlipayFinanceQuotationQuotetradeTradedaystateBatchqueryResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/response/AlipayFinanceQuotationQuotetradeTradedaystateBatchqueryResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/response/AlipayFinanceQuotationQuotetradeTradedaystateBatchqueryResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
from alipay.aop.api.domain.TradePeriodDTO import TradePeriodDTO
class AlipayFinanceQuotationQuotetradeTradedaystateBatchqueryResponse(AlipayResponse):
def __init__(self):
super(Ali... | 32.727273 | 136 | 0.681481 |
7976f8af748cf0fef0ad496cc0911e9c08507be5 | 17,212 | py | Python | da_methods/admin.py | franktoffel/dapper | 373a27273ea109f349e5edcdcef0cfe0b83b925e | [
"MIT"
] | 3 | 2021-07-31T10:13:11.000Z | 2022-01-14T16:52:04.000Z | da_methods/admin.py | franktoffel/dapper | 373a27273ea109f349e5edcdcef0cfe0b83b925e | [
"MIT"
] | null | null | null | da_methods/admin.py | franktoffel/dapper | 373a27273ea109f349e5edcdcef0cfe0b83b925e | [
"MIT"
] | null | null | null | from common import *
class HiddenMarkovModel(NestedPrint):
"""
Container for attributes of a Hidden Markov Model (HMM), to run a
"twin experiment", i.e. an "OSSE (observing system simulation experiment)".
"""
def __init__(self,Dyn,Obs,t,X0,**kwargs):
self.Dyn = Dyn if isinstance(Dyn, Operator) else Op... | 31.756458 | 106 | 0.603591 |
7976f928fecdc76f006a599ddc5ccbac16e44ed6 | 557 | py | Python | src/genie/libs/parser/nxos/tests/ShowDot1xAllSummary/cli/equal/golden_output_expected.py | balmasea/genieparser | d1e71a96dfb081e0a8591707b9d4872decd5d9d3 | [
"Apache-2.0"
] | 204 | 2018-06-27T00:55:27.000Z | 2022-03-06T21:12:18.000Z | src/genie/libs/parser/nxos/tests/ShowDot1xAllSummary/cli/equal/golden_output_expected.py | balmasea/genieparser | d1e71a96dfb081e0a8591707b9d4872decd5d9d3 | [
"Apache-2.0"
] | 468 | 2018-06-19T00:33:18.000Z | 2022-03-31T23:23:35.000Z | src/genie/libs/parser/nxos/tests/ShowDot1xAllSummary/cli/equal/golden_output_expected.py | balmasea/genieparser | d1e71a96dfb081e0a8591707b9d4872decd5d9d3 | [
"Apache-2.0"
] | 309 | 2019-01-16T20:21:07.000Z | 2022-03-30T12:56:41.000Z | expected_output = {
"interfaces": {
"Ethernet102/1/6": {
"interface": "Ethernet102/1/6",
"clients": {
"0E:BE:EF:FF:3F:3F": {
"client": "0E:BE:EF:FF:3F:3F",
"pae": "AUTH",
"status": "AUTHORIZED",
... | 26.52381 | 81 | 0.346499 |
7976fa28ef970aac49e7f5528a1a0adfc37d1cbb | 2,938 | py | Python | tests/bugs/core_1292_test.py | reevespaul/firebird-qa | 98f16f425aa9ab8ee63b86172f959d63a2d76f21 | [
"MIT"
] | null | null | null | tests/bugs/core_1292_test.py | reevespaul/firebird-qa | 98f16f425aa9ab8ee63b86172f959d63a2d76f21 | [
"MIT"
] | null | null | null | tests/bugs/core_1292_test.py | reevespaul/firebird-qa | 98f16f425aa9ab8ee63b86172f959d63a2d76f21 | [
"MIT"
] | null | null | null | #coding:utf-8
#
# id: bugs.core_1292
# title: Can't create table using long username and UTF8 as attachment charset
# decription:
# Checked on: 4.0.0.1635 SS/CS; 3.0.5.33180 SS/CS; 2.5.9.27119 SC/SS
#
# tracker_id: CORE-1292
# min_versions: []
# versions: 2.5
... | 27.980952 | 98 | 0.607897 |
7976fa5582d9f36087130c47cdf6db9c881da07a | 402 | py | Python | turtlebot3_autorace_parking/turtlebot3_autorace_parking_core/setup.py | Raymond310/turtlebot3_autorace_2020 | 2d5ff0ddbca11cca33318f795bfecbbe88ceb18a | [
"Apache-2.0"
] | null | null | null | turtlebot3_autorace_parking/turtlebot3_autorace_parking_core/setup.py | Raymond310/turtlebot3_autorace_2020 | 2d5ff0ddbca11cca33318f795bfecbbe88ceb18a | [
"Apache-2.0"
] | null | null | null | turtlebot3_autorace_parking/turtlebot3_autorace_parking_core/setup.py | Raymond310/turtlebot3_autorace_2020 | 2d5ff0ddbca11cca33318f795bfecbbe88ceb18a | [
"Apache-2.0"
] | 1 | 2022-02-08T20:42:10.000Z | 2022-02-08T20:42:10.000Z | ## ! DO NOT MANUALLY INVOKE THIS setup.py, USE CATKIN INSTEAD
## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html
from distutils.core import setup
from catkin_pkg.python_setup import generate_distutils_setup
# fetch values from package.xml
setup_args = generate_distutils_setup(
packages=['turtl... | 28.714286 | 70 | 0.778607 |
7976fbfb1f38e850a7238f25373e6a7e8ab6c1b8 | 239 | py | Python | MAB (Term 1)/arms/normal.py | ianpan870102/FYP-mab-python-weekly-progress | c491be0c263865b1f129c72ec0bdb71b782b6516 | [
"MIT"
] | null | null | null | MAB (Term 1)/arms/normal.py | ianpan870102/FYP-mab-python-weekly-progress | c491be0c263865b1f129c72ec0bdb71b782b6516 | [
"MIT"
] | null | null | null | MAB (Term 1)/arms/normal.py | ianpan870102/FYP-mab-python-weekly-progress | c491be0c263865b1f129c72ec0bdb71b782b6516 | [
"MIT"
] | null | null | null | import random
class NormalArm():
def __init__(self, mu, sigma):
self.mu = mu
self.sigma = sigma
def draw_reward(self):
"""Draw reward based on normal/gaussian distribution"""
return random.gauss(self.mu, self.sigma)
| 19.916667 | 59 | 0.682008 |
7976fc8e8280a9143f85b0172804810eb847f353 | 1,153 | py | Python | recipe_modules/tricium/examples/add_comment.py | Acidburn0zzz/luci | d8993f4684839b58f5f966dd6273d1d8fd001eae | [
"Apache-2.0"
] | 1 | 2021-04-24T04:03:01.000Z | 2021-04-24T04:03:01.000Z | recipe_modules/tricium/examples/add_comment.py | Acidburn0zzz/luci | d8993f4684839b58f5f966dd6273d1d8fd001eae | [
"Apache-2.0"
] | null | null | null | recipe_modules/tricium/examples/add_comment.py | Acidburn0zzz/luci | d8993f4684839b58f5f966dd6273d1d8fd001eae | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 The LUCI Authors. All rights reserved.
# Use of this source code is governed under the Apache License, Version 2.0
# that can be found in the LICENSE file.
from recipe_engine import post_process
from recipe_engine.recipe_api import Property
DEPS = ['tricium', 'properties']
PROPERTIES = {
'trigge... | 28.121951 | 75 | 0.712923 |
7976fd287cd8a071060f5729cf5298ab23bf8152 | 3,568 | py | Python | exchangelib/services/sync_folder_items.py | alorence/exchangelib | b2d3c8c368a8841d5c72ea05fe56640c1becb390 | [
"BSD-2-Clause"
] | null | null | null | exchangelib/services/sync_folder_items.py | alorence/exchangelib | b2d3c8c368a8841d5c72ea05fe56640c1becb390 | [
"BSD-2-Clause"
] | null | null | null | exchangelib/services/sync_folder_items.py | alorence/exchangelib | b2d3c8c368a8841d5c72ea05fe56640c1becb390 | [
"BSD-2-Clause"
] | 1 | 2021-04-22T21:27:15.000Z | 2021-04-22T21:27:15.000Z | from .common import add_xml_child, create_item_ids_element
from .sync_folder_hierarchy import SyncFolder
from ..properties import ItemId
from ..util import xml_text_to_value, peek, TNS, MNS
class SyncFolderItems(SyncFolder):
"""MSDN:
https://docs.microsoft.com/en-us/exchange/client-developer/web-service-refer... | 46.337662 | 115 | 0.654148 |
7976fdc4cf5a2906137143e1086e79f24551dadc | 31,658 | py | Python | nemo/core/neural_modules.py | yidong72/NeMo | 8e703fba0aa7368be1a44e641e59346ca786a6dc | [
"Apache-2.0"
] | 1 | 2021-01-14T13:15:40.000Z | 2021-01-14T13:15:40.000Z | nemo/core/neural_modules.py | yidong72/NeMo | 8e703fba0aa7368be1a44e641e59346ca786a6dc | [
"Apache-2.0"
] | null | null | null | nemo/core/neural_modules.py | yidong72/NeMo | 8e703fba0aa7368be1a44e641e59346ca786a6dc | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2019-, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 36.346728 | 119 | 0.618201 |
7976fe96eab7ebcc6fbaea26ed2c113363eecf50 | 2,724 | py | Python | pygeneratedata/dim_heavy_equipment_enterprise.py | yeyuan-acmis2019/yy-paper2022 | d72e5843ef8253bfab18fac7ed1ea954ff40ad02 | [
"Apache-2.0"
] | null | null | null | pygeneratedata/dim_heavy_equipment_enterprise.py | yeyuan-acmis2019/yy-paper2022 | d72e5843ef8253bfab18fac7ed1ea954ff40ad02 | [
"Apache-2.0"
] | null | null | null | pygeneratedata/dim_heavy_equipment_enterprise.py | yeyuan-acmis2019/yy-paper2022 | d72e5843ef8253bfab18fac7ed1ea954ff40ad02 | [
"Apache-2.0"
] | null | null | null | import pymysql
from faker import Faker
import random
from openpyxl import load_workbook
fake = Faker('zh_CN')
# 连接MySQL数据库
mysql_conn = pymysql.connect(host="192.168.101.105", user="root", password="123456", db="dim", port=3306,
charset='utf8')
cur = mysql_conn.cursor()
workbook = load_wor... | 46.169492 | 143 | 0.689427 |
7976feb2814c9786bb6a215e58e2959fa400f3ba | 4,523 | py | Python | cride/users/serializers/users.py | herchila/cride | db3946557d93e940386622d873b15425fbaae167 | [
"MIT"
] | null | null | null | cride/users/serializers/users.py | herchila/cride | db3946557d93e940386622d873b15425fbaae167 | [
"MIT"
] | 3 | 2021-06-08T20:18:06.000Z | 2022-03-11T23:57:22.000Z | cride/users/serializers/users.py | herchila/cride | db3946557d93e940386622d873b15425fbaae167 | [
"MIT"
] | null | null | null | """Users serializers"""
# Django
from django.conf import settings
from django.contrib.auth import password_validation, authenticate
from django.core.validators import RegexValidator
# Django REST Framework
from rest_framework import serializers
from rest_framework.validators import UniqueValidator
from rest_framework... | 29.180645 | 98 | 0.662171 |
7976fefeff195a632b54f4a49ffa506555dd1398 | 14,490 | py | Python | data_loader_cifar100.py | VascoLopes/LCMNAS | f5a5707c3bd6306a5831d1c78a30a1fd2d7c9912 | [
"MIT"
] | 7 | 2022-03-10T16:33:12.000Z | 2022-03-28T13:20:01.000Z | data_loader_cifar100.py | VascoLopes/LCMNAS | f5a5707c3bd6306a5831d1c78a30a1fd2d7c9912 | [
"MIT"
] | null | null | null | data_loader_cifar100.py | VascoLopes/LCMNAS | f5a5707c3bd6306a5831d1c78a30a1fd2d7c9912 | [
"MIT"
] | null | null | null | import torch
import numpy as np
from sklearn import model_selection
from torchvision import datasets
from torchvision import transforms
from torch.utils.data.sampler import SubsetRandomSampler, SequentialSampler
from cutout import Cutout
from autoaugment import CIFAR10Policy
import pickle
def get_train_valid_loader... | 32.271715 | 124 | 0.632022 |
7976ffb778f7ede41fe026042e15eeea35205194 | 1,623 | py | Python | model/layer/biaffineLayer.py | natcs98/NER-biaffine | c3fc62aa101c1772616a81356944a7fbd6abf520 | [
"Apache-2.0"
] | 2 | 2021-07-11T06:08:46.000Z | 2021-07-29T02:42:20.000Z | model/layer/biaffineLayer.py | natcs98/NER-biaffine | c3fc62aa101c1772616a81356944a7fbd6abf520 | [
"Apache-2.0"
] | null | null | null | model/layer/biaffineLayer.py | natcs98/NER-biaffine | c3fc62aa101c1772616a81356944a7fbd6abf520 | [
"Apache-2.0"
] | 1 | 2022-02-11T01:39:33.000Z | 2022-02-11T01:39:33.000Z | import torch.nn as nn
import torch
class BiaffineLayer(nn.Module):
def __init__(self, inSize1, inSize2, classSize, dropout=0.3):
super(BiaffineLayer, self).__init__()
self.bilinearMap = nn.Parameter(torch.FloatTensor(inSize1 + 1, classSize, inSize2 + 1))
self.classSize = classSize
de... | 36.886364 | 95 | 0.59581 |
797700045c9da05ebc42b61b8ab001d38f29ae48 | 1,426 | py | Python | src/utils/cmdLine/stdIoParams.py | ivomarvan/quick_faces | ba75ba1f0a217b1e845d7c09f8d18bb7a6913584 | [
"MIT"
] | 1 | 2020-11-18T17:06:39.000Z | 2020-11-18T17:06:39.000Z | src/utils/cmdLine/stdIoParams.py | ivomarvan/quick_faces | ba75ba1f0a217b1e845d7c09f8d18bb7a6913584 | [
"MIT"
] | null | null | null | src/utils/cmdLine/stdIoParams.py | ivomarvan/quick_faces | ba75ba1f0a217b1e845d7c09f8d18bb7a6913584 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Dodá do programu standardní parametry :
* vstupní soubor
* výstupní soubor
* mod pro debugování
"""
__author__ = "Ivo Marvan"
__email__ = "ivo@wikidi.com"
import sys
import logging
import os
import argparse
# root of lib repository
sys.pat... | 26.90566 | 78 | 0.58906 |
797700173dae00fad1d58bd23bf4f834274221a2 | 61 | py | Python | Exercicios/Mundo2/ex047.py | mpaullos/cursoemvideo-python | 80732626b6b5471ec7fea6dc01d83931e5cfd8fb | [
"MIT"
] | null | null | null | Exercicios/Mundo2/ex047.py | mpaullos/cursoemvideo-python | 80732626b6b5471ec7fea6dc01d83931e5cfd8fb | [
"MIT"
] | null | null | null | Exercicios/Mundo2/ex047.py | mpaullos/cursoemvideo-python | 80732626b6b5471ec7fea6dc01d83931e5cfd8fb | [
"MIT"
] | null | null | null | for c in range (2,51,2):
print(c,end=' ')
print('ACABOU') | 20.333333 | 24 | 0.57377 |
797700adb3ee1a9c71516f9892af4d4bed5aee68 | 1,219 | py | Python | create_random.py | ernewton/rogui | 0e138a6142fbd07586cb3689c432c2ae9805f2dc | [
"MIT"
] | 2 | 2015-06-29T15:40:29.000Z | 2015-06-29T21:22:32.000Z | create_random.py | ernewton/rogui | 0e138a6142fbd07586cb3689c432c2ae9805f2dc | [
"MIT"
] | null | null | null | create_random.py | ernewton/rogui | 0e138a6142fbd07586cb3689c432c2ae9805f2dc | [
"MIT"
] | 1 | 2020-02-20T15:17:51.000Z | 2020-02-20T15:17:51.000Z | import numpy as np
rand = np.random.RandomState(42)
t = 1000 * rand.rand(300)
y = 0.005*np.sin(2 * np.pi * t/50.) + 0.002 * rand.randn(len(t))
dy = 0.001 + 0.002* rand.rand(len(t))
i = range(300)
from astropy.io import ascii
from astropy.table import Table
data = Table([i, t, y, dy], names=['i', 'time', 'mag', 'error'... | 29.02381 | 65 | 0.609516 |
797700fadddb60f1988798390725e7d43010d45a | 39,434 | py | Python | sdk/python/pulumi_aws_native/s3/bucket.py | AaronFriel/pulumi-aws-native | 5621690373ac44accdbd20b11bae3be1baf022d1 | [
"Apache-2.0"
] | 29 | 2021-09-30T19:32:07.000Z | 2022-03-22T21:06:08.000Z | sdk/python/pulumi_aws_native/s3/bucket.py | AaronFriel/pulumi-aws-native | 5621690373ac44accdbd20b11bae3be1baf022d1 | [
"Apache-2.0"
] | 232 | 2021-09-30T19:26:26.000Z | 2022-03-31T23:22:06.000Z | sdk/python/pulumi_aws_native/s3/bucket.py | AaronFriel/pulumi-aws-native | 5621690373ac44accdbd20b11bae3be1baf022d1 | [
"Apache-2.0"
] | 4 | 2021-11-10T19:42:01.000Z | 2022-02-05T10:15:49.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, overload
from .. import _utilities
from... | 56.821326 | 226 | 0.716564 |
797701d271fb020db33de1299f26be57089a3415 | 3,657 | py | Python | eqs/tests/matrix_test.py | EladSharony/Mechanics | 078f97bea84114fc1db6fe9700b92b96b18a0d5e | [
"MIT"
] | 24 | 2021-02-23T13:53:14.000Z | 2022-03-29T16:40:56.000Z | eqs/tests/matrix_test.py | EladSharony/Mechanics | 078f97bea84114fc1db6fe9700b92b96b18a0d5e | [
"MIT"
] | 2 | 2021-04-23T12:30:32.000Z | 2022-03-31T10:51:12.000Z | eqs/tests/matrix_test.py | EladSharony/Mechanics | 078f97bea84114fc1db6fe9700b92b96b18a0d5e | [
"MIT"
] | 12 | 2021-04-11T20:44:03.000Z | 2022-03-30T19:23:58.000Z | import unittest
from eqs import Vector
from eqs.matrix import Matrix
class MatrixTest(unittest.TestCase):
def test_is_square(self):
self.assertTrue(
Matrix(2, 2).is_square
)
def test_is_not_square(self):
self.assertFalse(
Matrix(2, 3).is_square
)
... | 29.731707 | 63 | 0.560022 |
797701d51d109354da540135952ead63a5421259 | 23,194 | py | Python | src/Optimal path/test.py | SahilDhull/autonomous | 378fc7d6c5a9c34c4e915f080fb78ed5c11195d6 | [
"MIT"
] | 3 | 2020-02-28T12:04:26.000Z | 2022-02-27T00:42:56.000Z | src/Optimal path/test.py | SahilDhull/autonomous | 378fc7d6c5a9c34c4e915f080fb78ed5c11195d6 | [
"MIT"
] | null | null | null | src/Optimal path/test.py | SahilDhull/autonomous | 378fc7d6c5a9c34c4e915f080fb78ed5c11195d6 | [
"MIT"
] | null | null | null | ##Remaining tasks: -ve value of velocity, maxlimit of velocity, 0-acceleration
import numpy as np
import math
import copy
import dubins
import shapely.geometry as geom
import threading
from statistics import median
#Change radius of curvature for 0.9
from vel_acc_to_throttle import *
lock = threading.Lock()
... | 39.715753 | 2,099 | 0.54083 |
79770230c8df9910b4f60a9c781ba21e9180f360 | 6,389 | py | Python | scripts/graph_blast2besthits.py | CGATOxford/Optic | 2df92e953b5139ff4e5c383cb4383e6367cd47f1 | [
"MIT"
] | null | null | null | scripts/graph_blast2besthits.py | CGATOxford/Optic | 2df92e953b5139ff4e5c383cb4383e6367cd47f1 | [
"MIT"
] | null | null | null | scripts/graph_blast2besthits.py | CGATOxford/Optic | 2df92e953b5139ff4e5c383cb4383e6367cd47f1 | [
"MIT"
] | 1 | 2020-03-31T22:55:50.000Z | 2020-03-31T22:55:50.000Z | '''
graph_blast2besthits.py -
======================================================
:Author: Andreas Heger
:Release: $Id$
:Date: |today|
:Tags: Python
Purpose
-------
.. todo::
describe purpose of the script.
Usage
-----
Example::
python graph_blast2besthits.py --help
Type::
python graph_blast2be... | 27.303419 | 92 | 0.53326 |
7977027109e74a6e3f532e27e6a53cb59e6340a0 | 1,558 | py | Python | src/recursion/random_set.py | seahrh/coding-interview | 517d19e7e88c02acec4aa6336bc20206ce3f1897 | [
"MIT"
] | null | null | null | src/recursion/random_set.py | seahrh/coding-interview | 517d19e7e88c02acec4aa6336bc20206ce3f1897 | [
"MIT"
] | null | null | null | src/recursion/random_set.py | seahrh/coding-interview | 517d19e7e88c02acec4aa6336bc20206ce3f1897 | [
"MIT"
] | null | null | null | """
Random Set: Write a method to randomly generate a set of m integers from an array of size n.
Each element must have equal probability of being chosen.
(17.3, p544)
"""
from random import randint
def pick_rec(arr, m, index):
"""We can first pull a random set of size m from the first n - 1 elements.
... | 36.232558 | 93 | 0.610398 |
7977029826b09616fbb08f4b6540f1c9543ec05d | 4,108 | py | Python | venv/Lib/site-packages/pybtex/backends/markdown.py | PeerHerholz/guideline_jupyter_book | ce445e4be0d53370b67708a22550565b90d71ac6 | [
"BSD-3-Clause"
] | 2 | 2021-02-16T16:17:07.000Z | 2021-11-08T20:27:13.000Z | venv/Lib/site-packages/pybtex/backends/markdown.py | PeerHerholz/guideline_jupyter_book | ce445e4be0d53370b67708a22550565b90d71ac6 | [
"BSD-3-Clause"
] | null | null | null | venv/Lib/site-packages/pybtex/backends/markdown.py | PeerHerholz/guideline_jupyter_book | ce445e4be0d53370b67708a22550565b90d71ac6 | [
"BSD-3-Clause"
] | 4 | 2020-11-14T17:05:36.000Z | 2020-11-16T18:44:54.000Z | # -*- coding: utf8 -*-
#
# Copyright (c) 2006-2019 Andrey Golovigin
# Copyright (c) 2014 Jorrit Wronski
#
# 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
# wi... | 33.129032 | 95 | 0.629503 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.