blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 3 288 | content_id stringlengths 40 40 | detected_licenses listlengths 0 112 | license_type stringclasses 2
values | repo_name stringlengths 5 115 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringclasses 684
values | visit_date timestamp[us]date 2015-08-06 10:31:46 2023-09-06 10:44:38 | revision_date timestamp[us]date 1970-01-01 02:38:32 2037-05-03 13:00:00 | committer_date timestamp[us]date 1970-01-01 02:38:32 2023-09-06 01:08:06 | github_id int64 4.92k 681M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 22
values | gha_event_created_at timestamp[us]date 2012-06-04 01:52:49 2023-09-14 21:59:50 ⌀ | gha_created_at timestamp[us]date 2008-05-22 07:58:19 2023-08-21 12:35:19 ⌀ | gha_language stringclasses 147
values | src_encoding stringclasses 25
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 128 12.7k | extension stringclasses 142
values | content stringlengths 128 8.19k | authors listlengths 1 1 | author_id stringlengths 1 132 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
baa63fd29bd69bce20182d81ba8ea10fc20aeaef | 55c24645dd63a1c41037dcfb9fb45bc7bcdea4be | /venv/lib/python3.7/site-packages/dotenv/__init__.py | d412cb7ab9ae9061a2a73220df6a6d545add030c | [] | no_license | abdullah-nawaz/flask-boilerplate | 7c42801a21ee3e6a647cc8a7d92e0285f8e86cad | 01bc7fe1140e8ec613de4a38546a07ddfbdbd254 | refs/heads/master | 2022-12-02T05:06:08.297759 | 2020-06-24T21:36:32 | 2020-06-24T21:36:32 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,298 | py | from .compat import IS_TYPE_CHECKING
from .main import load_dotenv, get_key, set_key, unset_key, find_dotenv, dotenv_values
if IS_TYPE_CHECKING:
from typing import Any, Optional
def load_ipython_extension(ipython):
# type: (Any) -> None
from .ipython import load_ipython_extension
load_ipython_extens... | [
"muhammadabdullah@wanclouds.net"
] | muhammadabdullah@wanclouds.net |
3074414644d1dd7e52c820a7a85ceea77e7b7715 | c137d7fb6eaa1c1900a63b8dae6b027176a98b6f | /MxShop/MxShop/settings.py | 9006c19e5c0acd8bbeaca3301b28ae570a00c216 | [] | no_license | LasterSmithKim/vuedjango | 22220414ad2f928f0a0df1a0e68c9083e90c1cc7 | 4a5b7fee4dd3f2d31255d7dc9188ea977a75db29 | refs/heads/master | 2022-12-10T19:52:25.014956 | 2019-12-23T16:23:01 | 2019-12-23T16:23:01 | 225,315,491 | 0 | 0 | null | 2022-11-22T04:52:05 | 2019-12-02T07:47:12 | JavaScript | UTF-8 | Python | false | false | 4,922 | py | """
Django settings for MxShop project.
Generated by 'django-admin startproject' using Django 2.2.7.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""
import os
imp... | [
"kingone@yeah.net"
] | kingone@yeah.net |
2275f0288c637137c69388bc3029ea244a9b7fb4 | 0b53826167ae4337a92360ef0a8b37f0a30e1aef | /plan_b.py | 2e84b654e6fd23e18e9a743260ff6e065227906e | [] | no_license | nyghtowl/Evergreen_Competition | 712ac2c885e1622e12bce178e868c00aefd6fa2d | 456c6342cab250f61e2c02ee9d1199864342d375 | refs/heads/master | 2021-01-20T00:41:23.141388 | 2014-07-19T21:48:55 | 2014-07-19T21:48:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,678 | py | """
beating the benchmark @StumbleUpon Evergreen Challenge
__author__ : Abhishek Thakur
"""
# -*- coding: utf-8 -*-
import numpy as np
from sklearn import metrics,preprocessing,cross_validation
from sklearn.feature_extraction.text import TfidfVectorizer
import sklearn.linear_model as lm
import pandas as p
loadData =... | [
"warrick.melanie@gmail.com"
] | warrick.melanie@gmail.com |
5af284d0fe6592007bb1978462f2154dfd926980 | 9673935b03b25683b79e2e28a4584ebccd74cda9 | /closed/QCT/code/dlrm/tensorrt/infer.py | ae0dbe685a2d63f1e731a74d0cc78e3da802a9ec | [
"Apache-2.0"
] | permissive | wilderfield/inference_results_v0.7 | 7e737acec72ab0e79cf95a63987184f86c2cb0a2 | d63bb28a2919c79b69460005e686688f3fa033f1 | refs/heads/master | 2023-01-03T03:24:28.608820 | 2020-10-29T18:08:46 | 2020-10-29T18:08:46 | 306,124,077 | 0 | 0 | Apache-2.0 | 2020-10-21T19:15:17 | 2020-10-21T19:15:12 | null | UTF-8 | Python | false | false | 4,431 | py | #! /usr/bin/env python3
# Copyright (c) 2020, 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
#
# ... | [
"guschmue@microsoft.com"
] | guschmue@microsoft.com |
497cc3f06a4891c34917d8b345fd83fd16cc7af6 | 5d0d3cfac10e144468cc25d948e7994c5f968fd0 | /src/T2D23D.py | 930dfe4b34f879e793ca67eeaa01c43a64b3839b | [
"BSD-3-Clause",
"MIT"
] | permissive | WYGNG/USTC_SSE_Project | 1aff71631fd14dc26a0dd9190b76f97c5367d306 | 1c0cd4056f40445aed13ec1ae584608d625b9127 | refs/heads/master | 2022-12-26T13:53:48.543988 | 2020-09-27T08:02:08 | 2020-09-27T08:02:08 | 298,983,271 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,229 | py | import numpy as np
import matplotlib.pyplot as plt
import xlrd
import math
from scipy import optimize
# 计算角度,(x1, y1, z1)为顶点
def get_angle1(x1,y1,z1,x2,y2,z2,x3,y3,z3):
a=math.sqrt((x2-x3)**2+(y2-y3)**2+(z2-z3)**2)
b=math.sqrt((x1-x3)**2+(y1-y3)**2+(z1-z3)**2)
c=math.sqrt((x2-x1)**2+(y2-y1)**2+(z2-z1)**2)
... | [
"321699849@qq.com"
] | 321699849@qq.com |
12f5298b94e2213e4c9b120eec42f9982a07c04b | 96328f51c177bd53ca1d89199684af04008b0ba9 | /wiki_graph/util.py | c48945b102b570f0b07df5e5f23f8b6aa844ca7a | [
"MIT"
] | permissive | mvwicky/wiki-graph | b4045bf8200d579e99f9f58e77672d4dfac93c50 | a88e2f37e7d5b5ba93bcca67544746d682936f41 | refs/heads/master | 2020-03-11T16:52:19.213832 | 2018-05-14T16:23:00 | 2018-05-14T16:23:00 | 130,130,666 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,511 | py | import collections
import itertools
import sys
def rec_sizeof(o, handlers={}, verbose=False):
"""Returns the approximate memory footprint an object and all of its contents.
Automatically finds the contents of the following builtin containers and
their subclasses: tuple, list, deque, dict, set and frozen... | [
"mvanwickle@gmail.com"
] | mvanwickle@gmail.com |
98a07a8d052ae1d745b923459e18cd64001ebadb | d5a576c0b766124bd756922f818226d20867c6ef | /setup.py | a9c0a67377aef18bfcf1a11ca854655ec32fcda9 | [
"CC0-1.0",
"BSD-3-Clause"
] | permissive | fflewddur/python-phash | f6b32d4493858c2e9658d6b843dd816a5dcbfeb5 | 27152fd3c8b7a2cd032a33c25abeb423c582df65 | refs/heads/master | 2021-01-15T18:15:01.264905 | 2014-06-30T03:44:39 | 2014-06-30T03:44:39 | 21,335,530 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,377 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
try:
from setuptools import setup, Extension
except ImportError:
from distutils.core import setup, Extension
if sys.argv[-1] == 'publish':
os.system('python setup.py sdist upload')
sys.exit()
readme = open('README.rst').read()
histo... | [
"chris@improbable.org"
] | chris@improbable.org |
946673c401ad39509fd4681ff3e7bc0ff420ce49 | 3eacb8aa1e5e92dc354e61e3140009065257d643 | /tests/test__order.py | 0bb6ab3f4dddaf55af7934eafe1350d07e2e7f4b | [
"BSD-3-Clause"
] | permissive | dask-image/dask-ndfilters | d0db13802185ad719b07752074e57bd8d8dd8529 | 3e947e791e2b3dd3a59de04b9cb70987a75f2446 | refs/heads/master | 2021-01-20T00:45:51.188492 | 2018-08-30T21:59:18 | 2018-08-30T21:59:18 | 89,183,177 | 5 | 2 | BSD-3-Clause | 2018-08-30T21:36:20 | 2017-04-24T00:56:22 | Python | UTF-8 | Python | false | false | 5,669 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import
import pytest
import numpy as np
import scipy.ndimage.filters as sp_ndf
import dask
import dask.array as da
import dask.array.utils as dau
import dask_ndfilters as da_ndf
assert dask
@pytest.mark.parametrize(
"da_func, ext... | [
"kirkhamj@janelia.hhmi.org"
] | kirkhamj@janelia.hhmi.org |
f8b4ee7a035e6157e5582a93bf49c3a9b6ad803d | f1e11f9e50d061d05d581efa8805ab28b25d7b24 | /climi/pppp/hw_spatial_pattern_check___ | c14cab5e65815e0ec1c3c88f260e677acf70a59b | [
"MIT"
] | permissive | ahheo/climi | bdccb5116046dfbf0aa6e38e7400447e427eeae0 | 2043a23876a9e620d44b2e9dd34d487ee3e0fc4b | refs/heads/main | 2023-07-09T01:24:17.514954 | 2023-07-07T05:13:16 | 2023-07-07T05:13:16 | 302,750,076 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,876 | #!/usr/bin/env python3
from climi.uuuu import *
from climi.pppp import *
import os
import warnings
import matplotlib as mpl
mpl.use('pdf', force=True)
import matplotlib.pyplot as plt
import numpy as np
import iris
_here_ = get_path_(__file__)
sites = dict(
SE = (19, 45),
W1 = (7, 51.5),
W2 = (-1.5, 53... | [
"mapulynn@gmail.com"
] | mapulynn@gmail.com | |
b4a8594c676f389559ad8b7b703c3698c7687ed2 | 7e157b3bffb170ff87e29880611be9b040d61a27 | /purano/annotator/processors/tfidf.py | a941fe233977a850b27bd0b8b8c0de80ed1d253d | [
"Apache-2.0"
] | permissive | IlyaGusev/purano | 8906d5e35e8a4f0f31144d874721d4e9e5f76359 | 07234a55e8c80d1e9d8aeb8197c58e36dd26da54 | refs/heads/master | 2022-06-21T09:57:45.624005 | 2021-07-27T18:41:37 | 2021-07-27T18:41:37 | 212,185,927 | 5 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,588 | py | from typing import List, Optional
import numpy as np
import torch
from purano.annotator.processors import Processor
from purano.models import Document
from purano.proto.info_pb2 import Info as InfoPb
from purano.training.models.tfidf import load_idfs, get_tfidf_vector, SVDEmbedder
@Processor.register("tfidf")
class... | [
"phoenixilya@gmail.com"
] | phoenixilya@gmail.com |
0d339371d555fa7f40da404b5092acbd841c381b | 08cfc4fb5f0d2f11e4e226f12520a17c5160f0a2 | /kubernetes/test/test_v1_namespace_list.py | eecef48f123f70650b3c855d6413abfa52021b87 | [
"Apache-2.0"
] | permissive | ex3cv/client-python | 5c6ee93dff2424828d064b5a2cdbed3f80b74868 | 2c0bed9c4f653472289324914a8f0ad4cbb3a1cb | refs/heads/master | 2021-07-12T13:37:26.049372 | 2017-10-16T20:19:01 | 2017-10-16T20:19:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 953 | py | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.8.1
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import os
import sys
im... | [
"mehdy@google.com"
] | mehdy@google.com |
4fa7a1d1958a21a196156bb7fb162e220b5a4c42 | 157d2a2f4031c58e5504bcbac5348ff53883facc | /rDj63/rDj63/urls.py | c4a78403fddc9db36bfb4f94aefa067e840b972c | [] | no_license | optirg-39/Django_gekSh | d78b635fd3ee88addd084b68ec35c6284adfb55c | 1129a6df35c110dfeeeaaf1a76b2ebc192a5f1ce | refs/heads/master | 2023-04-15T13:09:03.067099 | 2021-04-26T12:15:35 | 2021-04-26T12:15:35 | 352,018,795 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,008 | py | """rDj63 URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.1/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-based v... | [
"opti39rg@gmail.com"
] | opti39rg@gmail.com |
ba7c90fd43394d63878f354d584a396087cd06f9 | 09e57dd1374713f06b70d7b37a580130d9bbab0d | /data/p2DJ/New/R2/benchmark/startPyquil122.py | 3fd855f9728d33e5489e4eb157beb0e6dabf2e1b | [
"BSD-3-Clause"
] | permissive | UCLA-SEAL/QDiff | ad53650034897abb5941e74539e3aee8edb600ab | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | refs/heads/main | 2023-08-05T04:52:24.961998 | 2021-09-19T02:56:16 | 2021-09-19T02:56:16 | 405,159,939 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,136 | py | # qubit number=2
# total number=10
import pyquil
from pyquil.api import local_forest_runtime, QVMConnection
from pyquil import Program, get_qc
from pyquil.gates import *
import numpy as np
conn = QVMConnection()
def make_circuit()-> Program:
prog = Program() # circuit begin
prog += H(0) # number=1
pr... | [
"wangjiyuan123@yeah.net"
] | wangjiyuan123@yeah.net |
270375ee24a54029cec52788cd572a47ddcc8f30 | 0804c9f4d46e15a93a4322808b487eb00c28da95 | /Chapter 10/BPApp/HiTech/engg/routes.py | 0a37098872ecb6b648d051b9c3b2fa6c8071f0b3 | [
"MIT"
] | permissive | bpbpublications/Building-Web-Apps-with-Python-and-Flask | 99b6e9312a41bea1ba6c6c5dce70f958b86ad768 | 4fbbe75fad9629f16ff5bf8bd603aa09dd04f9eb | refs/heads/main | 2023-03-27T05:55:23.170813 | 2021-03-23T10:27:59 | 2021-03-23T10:27:59 | 339,637,598 | 3 | 3 | null | null | null | null | UTF-8 | Python | false | false | 608 | py | from flask import Blueprint, render_template
engg=Blueprint('engg', __name__,template_folder='templates',static_folder='static')
@engg.route('/')
def index():
return render_template('engindex.html')
@engg.route('/courses')
def courses():
return '<h1>list of courses in Enginnering</h1>'
@engg.route('/fac... | [
"41231825+bpbpublications@users.noreply.github.com"
] | 41231825+bpbpublications@users.noreply.github.com |
e62d95154c55d2a4f3766e12e5274d5f6283c5f7 | 213682d70d45739b8a4fd7c0fcf05437a0704c4d | /pipeline/ve/share/radical.pilot/examples/00_getting_started.py | f4a0df0d42b456b1edfef3b2a02e65281648c08e | [] | no_license | ATLAS-Titan/misc | d272adfe13fcbbea1562ca98c718bc1465032421 | 0a20d158d0d9a95ef72b6a8d0bccbb68193e98c0 | refs/heads/master | 2020-12-24T06:31:10.696708 | 2017-07-18T14:55:41 | 2017-07-18T14:55:41 | 73,486,659 | 0 | 2 | null | null | null | null | UTF-8 | Python | false | false | 4,381 | py | #!/usr/bin/env python
__copyright__ = 'Copyright 2013-2014, http://radical.rutgers.edu'
__license__ = 'MIT'
import os
import sys
import radical.pilot as rp
import radical.utils as ru
# ------------------------------------------------------------------------------
#
# READ the RADICAL-Pilot documentation: http://... | [
"alessio.angius.research@gmail.com"
] | alessio.angius.research@gmail.com |
644fab70a5b3af9bb5dfa778fe89ab854f219ed8 | 63d3a6255f2677f9d92205d62163b9d22a74c5c7 | /modules/dynadb/migrations/0058_auto_20161124_1741.py | 89a757a370f4bc40d44bddae34790dc82e409e84 | [
"Apache-2.0"
] | permissive | GPCRmd/GPCRmd | 9204f39b1bfbc800b13512b316e05e54ddd8af23 | 47d7a4e71025b70e15a0f752760873249932c54e | refs/heads/main | 2023-09-04T11:13:44.285629 | 2023-08-29T13:43:01 | 2023-08-29T13:43:01 | 260,036,875 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 616 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.9.5 on 2016-11-24 16:41
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('dynadb', '0057_auto_20161116_2004'),
]
operations = [
migrations.AlterField(... | [
"adrian.garcia.recio@gmail.com"
] | adrian.garcia.recio@gmail.com |
03c962b553ec91380beb9b3231464bb8fae29bc0 | fccb35b69307ae4848aeee484995100de624dedf | /toolbox/bulk_processing/invalid_address_processor.py | b00f886d424ecf8dbac31af077a0420d5a05d53a | [] | no_license | ONSdigital/census-rm-toolbox | 468d1cb8e901bc8ae87a693495b85080c9d85e9f | 17eeae06f859091805e3fd3d5f8e620500af6741 | refs/heads/master | 2023-08-21T13:23:55.614636 | 2021-05-18T07:44:31 | 2021-05-18T07:44:31 | 207,325,373 | 0 | 1 | null | 2023-07-25T17:05:59 | 2019-09-09T14:12:11 | Python | UTF-8 | Python | false | false | 1,827 | py | import logging
import uuid
from datetime import datetime
from structlog import wrap_logger
from toolbox.bulk_processing.bulk_processor import BulkProcessor
from toolbox.bulk_processing.processor_interface import Processor
from toolbox.bulk_processing.validators import case_exists_by_id, is_uuid, max_length, mandatory... | [
"noreply@github.com"
] | ONSdigital.noreply@github.com |
29a6f8130b12ecd4a5d0cc05a93f14e402d00970 | fb8c10b50bd42db139330a8ed596e864bb8ae440 | /Tkinter_GUI_Python/7941OT_8_code/8.03 validation mode demo.py | 34ce49915abce5b3c1d9238126e6942966dd0de9 | [] | no_license | masb01/test | 628c9bc4297e6c1b745503e297682258553d87cf | 7e402d5744d4395ebd660f3c05044bf3df16ce7c | refs/heads/master | 2020-03-18T20:59:38.142095 | 2018-06-10T15:15:16 | 2018-06-10T15:15:16 | 135,251,526 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,876 | py | """
Code illustration: 8.03
Validation Modes Demo
Tkinter GUI Application Development Hotshot
"""
import Tkinter as tk
class ValidateModeDemo():
def __init__(self):
self.root = tk.Tk()
vcmd = (self.root.register(self.validate), '%V')
# validate = none mode - wil... | [
"masb160119672gmail.com"
] | masb160119672gmail.com |
173c766edb003276de453cf1019773545a9f23ff | 4832856f115ef30fb9f611e92d7e473d531f6c4d | /setup.py | 19d11a618feed45d888db08e66dea88ba2d3197c | [
"Apache-2.0"
] | permissive | nycto-hackerone/OWASP-Nettacker | 9c2a227eaf5175ce42181650911ae795846637a3 | 33f7e4a53b4773c91be57bfb535baec3478ca85c | refs/heads/master | 2021-01-24T00:04:33.864977 | 2018-02-24T11:34:45 | 2018-02-24T11:34:45 | 122,752,364 | 1 | 1 | Apache-2.0 | 2018-02-24T15:26:53 | 2018-02-24T15:26:53 | null | UTF-8 | Python | false | false | 2,347 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import os
from setuptools import setup
from setuptools import find_packages
def package_files(directory):
"""
This function was created to crawl the directory and find files (none python files) using os.walk
Args:
directory: path to crawl
... | [
"ali.razmjoo@owasp.org"
] | ali.razmjoo@owasp.org |
db9f504a531a4656b87987f9b9f0af2db5399ace | 7896baeb297e131bab53cfbff712d1fd77bccede | /gombru/style_images_COCO.py | a633bfa3a8ce2a1b81682b5d1c45eaa1fa8824bc | [
"Apache-2.0"
] | permissive | gombru/magenta_styleTransfer | 599b85b24dd406a82df271bb769fe3dc1fa19f0b | bd41b0bf3bb18988653e4a355d95dac8632e814f | refs/heads/master | 2020-04-11T23:11:47.133793 | 2019-02-12T12:12:50 | 2019-02-12T12:12:50 | 162,159,299 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,049 | py | from magenta.models.image_stylization import image_stylization_transform
from PIL import Image
import os
import warnings
import random
warnings.filterwarnings("ignore")
results_path = "/home/Imatge/ssd2/ICDAR_2015_IndidentalSceneText/train/img_styled_icdar/"
num_styles = 96 # 9, 32, 34
# checkpoint = "/home/raulgome... | [
"raulgombru@gmail.com"
] | raulgombru@gmail.com |
42e9fb0e23fdf748d185ab5a38dff35ff23cb749 | 83048ab1abb6941ed0b19fb5e5ff4a9d14b48e8c | /CODEFORCES/park_light.py | 880f197a915fce16db419ae24c4356fa190e9c66 | [] | no_license | harshitalpha/Algorithms | ebad07cc77516ab5c35ae414462d10a38d5ef97e | 2f7dcf4c3bb4390267231c7c96f7e76399c0166e | refs/heads/master | 2021-07-14T17:34:02.546583 | 2020-06-25T06:38:39 | 2020-06-25T06:38:39 | 178,813,562 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 216 | py | import math
for _ in range(int(input())):
r, c = [int(s) for s in input().split()]
if r%2 == 0:
ans = (r/2)*c
else:
ans = (r-1)/2 * c
ans = ans + math.ceil(c/2)
print(int(ans)) | [
"harshitsinghal1103@gmail.com"
] | harshitsinghal1103@gmail.com |
02ead0e966188d8db902b52401360de29dc3478e | d94b6845aeeb412aac6850b70e22628bc84d1d6d | /smurf/smurf_end_to_end_test.py | f50fb3e7c366d7a6b332c231de7d1e830aa81c90 | [
"CC-BY-4.0",
"Apache-2.0"
] | permissive | ishine/google-research | 541aea114a68ced68736340e037fc0f8257d1ea2 | c1ae273841592fce4c993bf35cdd0a6424e73da4 | refs/heads/master | 2023-06-08T23:02:25.502203 | 2023-05-31T01:00:56 | 2023-05-31T01:06:45 | 242,478,569 | 0 | 0 | Apache-2.0 | 2020-06-23T01:55:11 | 2020-02-23T07:59:42 | Jupyter Notebook | UTF-8 | Python | false | false | 2,453 | py | # coding=utf-8
# Copyright 2023 The Google Research 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 applicab... | [
"copybara-worker@google.com"
] | copybara-worker@google.com |
b45b8e88f4ed303e52d90dfa4d01ea1f2386ac4f | df983affa658d3169aebcd95e255c7cafccf1aa0 | /build/common_msgs/actionlib_msgs/catkin_generated/actionlib_msgs-extras.cmake.develspace.context.cmake.py | b6d5b0ec3ce04c0a47984337071656b8a6699bb8 | [] | no_license | Ektachaurasia/Backup | 17045d3cd3185ca47c53b02298fe1c123ee8a058 | e5ab8532f6cd599ebe4b501626ddba2c6c5d83ab | refs/heads/main | 2023-06-20T21:49:54.092227 | 2021-07-28T04:31:15 | 2021-07-28T04:31:15 | 390,155,001 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,445 | py | # generated from catkin/cmake/template/cfg-extras.context.py.in
DEVELSPACE = 'TRUE' == 'TRUE'
INSTALLSPACE = 'FALSE' == 'TRUE'
CATKIN_DEVEL_PREFIX = '/home/pi/catkin_ws/devel'
CATKIN_GLOBAL_BIN_DESTINATION = 'bin'
CATKIN_GLOBAL_ETC_DESTINATION = 'etc'
CATKIN_GLOBAL_INCLUDE_DESTINATION = 'include'
CATKIN_GLOBAL_LIB_DE... | [
"ektachaurasia02@gmail.com"
] | ektachaurasia02@gmail.com |
e5b0112718fb300ed3d147add9a9e182d8b2ea1e | 7aec3f10b07403b542e1c14a30a6e00bb479c3fe | /Codewars/8 kyu/Convert number to reversed array of digits.py | e7cbae004c0ea231f393eff942a158cedabe542b | [] | no_license | VictorMinsky/Algorithmic-Tasks | a5871749b377767176ba82308a6a0962e1b3e400 | 03a35b0541fe413eca68f7b5521eaa35d0e611eb | refs/heads/master | 2020-08-02T23:18:06.876712 | 2020-01-16T19:08:49 | 2020-01-16T19:08:49 | 211,541,179 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 294 | py | """
Convert number to reversed array of digits
Given a random number:
C#: long;
C++: unsigned long;
You have to return the digits of this number within an array in reverse order.
Example:
348597 => [7,9,5,8,4,3]
"""
def digitize(n):
return list(reversed(list(map(int, list(str(n))))))
| [
"panasyuk.vityu@gmail.com"
] | panasyuk.vityu@gmail.com |
a1ac053acc68c25f371d3926ce3b7044ee603984 | e76fda1fba459456c4bc105e7a6dcc6277a1a26c | /django_cv/blog/migrations/0003_auto_20160717_0956.py | 1c16fe69db75afb49377755969266de63f4546d1 | [] | no_license | lafabo/i-love-tutorials | 6bb2a684a201975ab523d9721b02761a6269853c | eafcd47fd62e770107c7e1f08e0d6d60a539f1ec | refs/heads/master | 2021-01-21T04:46:56.365199 | 2016-07-20T17:38:03 | 2016-07-20T17:38:03 | 47,709,568 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 782 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2016-07-17 09:56
from __future__ import unicode_literals
import datetime
from django.db import migrations, models
from django.utils.timezone import utc
class Migration(migrations.Migration):
dependencies = [
('blog', '0002_auto_20160717_0754'),
... | [
"lazyfatboy@ya.ru"
] | lazyfatboy@ya.ru |
f7ac703f00dbfce30712bfb9a545f0ea45d5721d | 463bdbc8cdca6802f0ff224af0719b078d336f42 | /semana-2/futbolista.py | 9e3ed3c57cb464116fa991975c15d833f271f628 | [] | no_license | BrandonBaLu/poo--1719110177 | 21b99bf4484030c32a26dc12cc3848b9cee12c16 | a3e72a46e284bdd7f2106e444d9d262f390fb296 | refs/heads/master | 2022-12-02T13:49:20.715214 | 2020-08-06T20:53:46 | 2020-08-06T20:53:46 | 265,976,230 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 642 | py | class futbolista:
edad= 22
altura= 1.80
camiseta= 1
posicion= "delantero"
categoria="juvenil"
nombre= "Brandon BaLu"
def correr(self):
print("correr")
def saltar(self):
print("saltar")
def patear(self):
print("patear")
def gol(self):
print("meter gol")
def festejar(self):
pr... | [
"replituser@example.com"
] | replituser@example.com |
cc2c49aa611b103c5981d71833739c0d1bfcef5b | 98e4005eb908773cd0be5b46e297024395b43b1c | /tasks.py | 40ed204392e83dfac108eef63ee1327a48ea4d32 | [
"MIT"
] | permissive | aparamon/block-timer | 110f456a5ae4e1311731c321de49565915074a70 | 8c7159253610728aaa810742bdaa1f9064e1fc5d | refs/heads/master | 2020-03-24T21:29:43.643985 | 2017-10-06T08:07:52 | 2017-10-06T08:07:52 | 143,035,520 | 0 | 0 | null | 2018-07-31T15:49:17 | 2018-07-31T15:49:17 | null | UTF-8 | Python | false | false | 1,769 | py | # -*- encoding: utf-8 -*-
# ! python3
import shutil
from invoke import run, task
@task
def clean():
"""remove build artifacts"""
shutil.rmtree('block_timer.egg-info', ignore_errors=True)
shutil.rmtree('build', ignore_errors=True)
shutil.rmtree('dist', ignore_errors=True)
shutil.rmtree('htmlcov',... | [
"vaclav.dohnal@gmail.com"
] | vaclav.dohnal@gmail.com |
07b91e1d7deec94489258dd04edee096ab9d58e2 | 285c76618cf9569a6074bfe5e7f4260d1eedf62a | /jjj filter.py | fb5a33c3b46f73480634287e7d539dfdbd2ca8af | [] | no_license | kiniamogh/options_analysis | 90b13e335a4426fb98eeb9ef6da6eebeff2838f4 | da162bf4fbe7b5c5b70d48b284de0ab0f639061d | refs/heads/master | 2023-06-27T06:25:51.672197 | 2021-06-16T23:11:58 | 2021-06-16T23:11:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,337 | py | import yfinance as yf
import pandas as pd
import numpy as np
import timeit
from datetime import datetime as dt
from scipy.stats import norm
start = timeit.default_timer()
# https://algotrading101.com/learn/yfinance-guide/
#https://aroussi.com/post/download-options-data
#prompt for a symbol
symbol = input('What is... | [
"jsiddique@gmail.com"
] | jsiddique@gmail.com |
328968e0b146457abb4379014c28d200edcdd065 | 47516f1e2356b3e02d96beabf7d05f1f5d89066e | /test-mess/perlii/pypi/p.py | 00a1199efe54867d49a3142ff2d18db91f72d6f4 | [] | no_license | su8/mega-drive | 8b9de109921343302c274e3af82d035bdf7ab004 | d92efdf21734b05a55954aec93fd39a10396924f | refs/heads/master | 2021-04-03T04:16:49.454792 | 2018-05-06T12:02:22 | 2018-05-06T12:02:22 | 124,764,214 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 140 | py | def multiply():
a=3
b=4
print("Will compute", a, "times", b)
c = 0
for i in range(0, a):
c = c + b
return c
| [
"a@b.c"
] | a@b.c |
59ab40f18c28b7bc7c88eb68a4fd01b89ae91535 | 892a07f9393b51f27bdd865a8721599a5a5f63d8 | /download_info.py | 9fec5bccf1c7a6b8d435c4e5d6502f69c39d6a7b | [] | no_license | TianyuDu/UTCourses | 4263e2258e221794581418b37266b51d3070c066 | 3a2d57e67ec6109d22fe5b698ebd77a3c40a6dab | refs/heads/master | 2020-09-10T01:44:10.965653 | 2019-11-18T23:50:30 | 2019-11-18T23:50:30 | 221,618,482 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,748 | py | import numpy as np
import pandas as pd
import selenium
from selenium import webdriver
import time
class bot():
def __init__(self):
self.driver = webdriver.Chrome("./chromedriver")
self.driver.get("https://timetable.iit.artsci.utoronto.ca/")
def close(self):
self.driver.close()
de... | [
"masterdu9951@icloud.com"
] | masterdu9951@icloud.com |
6a67fbcb39334683fc4c6b183bea6cd0f44d3110 | 5326f4145414e096f6f145a71f6c7e1669230e71 | /challenges/c40_FilteringRecords/filtering_records/filtering_records.py | b54f0d705e269c4f69805aa012e0edf75ed8d7bc | [] | no_license | andrew-rietz/FiftySeven_Coding_Challenges | a670bd6b1dcf6f99775c2100d297e01a26555af9 | 218894fbad8ac3389003ce7321fd4c4020239fd6 | refs/heads/master | 2022-10-17T15:41:01.705609 | 2019-10-03T05:27:45 | 2019-10-03T05:27:45 | 181,096,850 | 0 | 0 | null | 2022-09-16T18:10:31 | 2019-04-12T23:33:52 | Python | UTF-8 | Python | false | false | 3,651 | py | import sys
import os
from operator import itemgetter
sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))))
from util_functions.utils import table, user_inputs
class EmployeeDatabase():
"""Represents a database of employee information (first name, last name,
position/tit... | [
"andrew.rietz@gmail.com"
] | andrew.rietz@gmail.com |
59539c4599d0962bcf71259515908994a8e5da65 | a80884040ce1c178274a3068d216f440dd541844 | /rxsci/state/store.py | 85d2a5655120e091fe557dcc1599571345abfe42 | [
"MIT"
] | permissive | maki-nage/rxsci | a4aae51edc1ef684b55df22e34c11aa1d54ef740 | 915e59ebf593c4b313265bb87cf0e1209ec2ee0f | refs/heads/master | 2023-01-19T14:32:11.638497 | 2023-01-17T08:06:35 | 2023-01-17T08:06:35 | 242,592,973 | 9 | 2 | MIT | 2022-11-08T21:54:16 | 2020-02-23T21:23:56 | Python | UTF-8 | Python | false | false | 3,514 | py |
class Store(object):
def __init__(self, topology, store_factory):
"""one per partition
"""
self.states = []
for state in topology.states:
self.states.append(store_factory(
name=state.name,
data_type=state.data_type,
defaul... | [
"romain.picard@oakbits.com"
] | romain.picard@oakbits.com |
791272d372a823c1d6e970236552365d7b3a754a | 7078044ab0f8f1c1f4062a0e295d0b0c66f49734 | /Seq2Seq/py/fsa.py | d3cc4cf306fb02e077bd6b0dae8f687c8cb9b7c9 | [] | no_license | shixing/xing_rnn | 854061ee0a1d9de5f3d761df8f1769a3f2b98bc9 | 48f9089f5df97ef2ee6a79f01430ab32dc101512 | refs/heads/master | 2022-11-10T11:35:16.798208 | 2018-05-17T19:08:50 | 2018-05-17T19:08:50 | 86,934,874 | 4 | 4 | null | 2022-10-20T20:53:39 | 2017-04-01T18:46:44 | Python | UTF-8 | Python | false | false | 6,181 | py | import re
import math
from logging_helper import mylog, mylog_section, mylog_subsection, mylog_line
class State:
def __init__(self, str_name):
self.name = str_name
self.weights = {} # {int_word: {str_state_name: (state_s, float_weight)}} and float_weigth are in log space
self.next_word_i... | [
"shixing19910105@gmail.com"
] | shixing19910105@gmail.com |
11da7904a42782276ec0655cb6e620a333aaf166 | 5839614a5e2fa0b59acd09a623115efa962ee89d | /conda/_vendor/auxlib/logz.py | ac0ff89768fcabff7dd1c707d97ee02d871516a7 | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-public-domain"
] | permissive | schae234/conda | 110c25b35a3a0cdafed2ace6895f275e82233481 | 5bb678fe9c1445e62857db4fc55f10602cfa96a3 | refs/heads/master | 2021-01-18T20:27:37.134990 | 2016-08-03T17:36:51 | 2016-08-03T17:36:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,975 | py | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
from json import JSONEncoder
from logging import getLogger, INFO, Handler, Formatter, StreamHandler, DEBUG
from pprint import pformat
from sys import stderr
log = getLogger(__name__)
root_log = getLogger()
DEBUG... | [
"kfranz@continuum.io"
] | kfranz@continuum.io |
298572d842e993f618c640c486277f700ba6ec7b | 05b42178aaefd7efdb2fb19fdea8e58056d8d4bd | /leetcode/combination_sum/recursive_1.py | f41f141fd86c2c7bc3479dea3ee84f4c399a59cb | [] | no_license | chrisjdavie/interview_practice | 43ca3df25fb0538d685a59ac752a6a4b269c44e9 | 2d47d583ed9c838a802b4aa4cefe649c77f5dd7f | refs/heads/master | 2023-08-16T18:22:46.492623 | 2023-08-16T16:04:01 | 2023-08-16T16:04:01 | 247,268,317 | 0 | 0 | null | 2020-03-14T17:35:12 | 2020-03-14T12:01:43 | Python | UTF-8 | Python | false | false | 2,458 | py | """
https://leetcode.com/problems/combination-sum/
Given an array of distinct integers `candidates` and a target integer `target`, return a list of all unique combinations of `candidates` where the chosen numbers sum to `target`. You may return the combinations in any order.
The same number may be chosen from candida... | [
"cjdavie@googlemail.com"
] | cjdavie@googlemail.com |
5685e8af0a83996ef0288ac44c99899d0a7c43ec | 2bb90b620f86d0d49f19f01593e1a4cc3c2e7ba8 | /pardus/tags/2007/programming/libs/liblrdf/actions.py | bc89302e9235025b741e9b91d9bb59681be0b8c9 | [] | no_license | aligulle1/kuller | bda0d59ce8400aa3c7ba9c7e19589f27313492f7 | 7f98de19be27d7a517fe19a37c814748f7e18ba6 | refs/heads/master | 2021-01-20T02:22:09.451356 | 2013-07-23T17:57:58 | 2013-07-23T17:57:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 540 | py | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright 2005,2006 TUBITAK/UEKAE
# Licensed under the GNU General Public License, version 2.
# See the file http://www.gnu.org/copyleft/gpl.txt.
from pisi.actionsapi import autotools
from pisi.actionsapi import pisitools
from pisi.actionsapi import get
WorkDir = "liblrd... | [
"yusuf.aydemir@istanbul.com"
] | yusuf.aydemir@istanbul.com |
877f97e8de9331c59f06734cbd4df10c70b75efd | 4b41a76c5c366ba2daa30843acea16609b8f5da7 | /2017/01/AoC17_01_1.py | 776cd60ef6af6c060d9c2488d256ca8fbd15d274 | [] | no_license | grandfoosier/AdventOfCode | c4706cfefef61e80060cca89b0433636e42bf974 | a43fdd72fe4279196252f24a4894500a4e272a5d | refs/heads/master | 2020-06-11T12:36:48.699811 | 2019-01-14T23:44:44 | 2019-01-14T23:44:44 | 75,665,958 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 226 | py | fname = "AoC17_01_1.txt"
text = [line.rstrip('\n') for line in open(fname)][0]
print "\nInteger Stream Loaded\n"
n = len(text)
sol = sum(int(c) for i,c in enumerate(text)
if text[i] == text[(i+1)%n])
print sol
print "\n"
| [
"noreply@github.com"
] | grandfoosier.noreply@github.com |
d51046eba4b9559778329e5ac3429bc3f38fdbf6 | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_135/846.py | 2e11d979e792075a6ed484de0808b1e4c66a2eee | [] | no_license | dr-dos-ok/Code_Jam_Webscraper | c06fd59870842664cd79c41eb460a09553e1c80a | 26a35bf114a3aa30fc4c677ef069d95f41665cc0 | refs/heads/master | 2020-04-06T08:17:40.938460 | 2018-10-14T10:12:47 | 2018-10-14T10:12:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 898 | py | from sys import argv
script, in_txt, out_txt = argv
def solver(in_txt, out_txt):
in_file = open(in_txt)
out_file = open(out_txt, 'w')
T = int(in_file.readline())
for t in range(T):
N = int(in_file.readline())
ls = []
for i in range(4):
x = map(int, in_file.readline().split())
... | [
"miliar1732@gmail.com"
] | miliar1732@gmail.com |
013ed97a9e4b87e7c35ccbdd5a03e89df9b11bf3 | 469318e9a1ff8966199529affa1e4900a9f13ff0 | /src/structured_data/_adt/sum_type.py | b356eb5a8c1981146ea9e7e04d39ee2dc238e3e9 | [
"MIT"
] | permissive | mwchase/python-structured-data | 06e968a96d3953bd6f585aad66e3bea8921106e2 | 1059ddaf0728610576299f30485fad221cf5695c | refs/heads/master | 2021-06-13T08:41:46.148869 | 2021-02-23T18:37:26 | 2021-02-23T18:37:26 | 136,821,798 | 2 | 0 | MIT | 2020-02-05T21:59:00 | 2018-06-10T15:40:41 | Python | UTF-8 | Python | false | false | 4,464 | py | """Internal implementation of the Sum base class."""
from __future__ import annotations
import typing
from .. import _cant_modify
from . import constructor
from . import ordering
from . import prewritten_methods
from . import product_type
_T = typing.TypeVar("_T")
def _conditional_call(call: bool, func: typing.Ca... | [
"max.chase@gmail.com"
] | max.chase@gmail.com |
7ed1a8bc8bf59dbe6985ba6d4568c3994d6222d7 | b45b3e5e7389d071161fa52340cb119a29c76907 | /ieWin_test.py | ea4039f4389737ebc027d2b25c466e520fb3c2e2 | [] | no_license | Metallicow/wxPythonDemos | 2fc6882a11a0aa6bb35c42f163cfcd6b3456f4fd | 396d1ade5930528ec7518b9c22dc93a274cb418f | refs/heads/master | 2020-12-25T11:52:18.577898 | 2013-05-19T18:58:11 | 2013-05-19T18:58:11 | 11,283,970 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,138 | py | #!/usr/bin/env
import wx
if wx.Platform == '__WXMSW__':
import wx.lib.iewin as iewin
else:
raise ImporrError("This test only works on windows")
class DemoFrame(wx.Frame):
""" This window displays a button """
def __init__(self, title = "Micro App"):
wx.Frame.__init__(self, None , -1, title)
... | [
"Chris.Barker@noaa.gov"
] | Chris.Barker@noaa.gov |
cba1ccfc085d6e62bbd832f0e0ea224fd7d50d46 | f5dae529fa0a42678cbf0261e227e45101317034 | /test/backward_compatibility/check_backward_compatibility.py | 0f45a263b874e529e5b5f54e3d37924c58914a83 | [
"BSD-3-Clause",
"LicenseRef-scancode-generic-cla",
"Apache-2.0",
"BSD-2-Clause"
] | permissive | kamiedu/pytorch | 0fa1d28f4332bf1fd2bb93169254f2bcc2c4d039 | 54a1e8509c9e88200139a37a7dd3a86660849591 | refs/heads/master | 2022-05-22T08:55:36.432225 | 2020-04-17T20:33:42 | 2020-04-17T20:36:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,535 | py | from __future__ import absolute_import, division, print_function, unicode_literals
import argparse
import datetime
import re
import sys
import torch
from torch._C import parse_schema
# The date specifies how long the whitelist exclusion should apply to.
#
# - If we NEVER give BC guarantee for an operator, you can ... | [
"facebook-github-bot@users.noreply.github.com"
] | facebook-github-bot@users.noreply.github.com |
6e40e95fe1174dabcfdcd931cd6b707d1b097850 | caef61baf7fc3f933d2fca8dceb7598be22adde1 | /openapi_core/templating/datatypes.py | 7087d9e345fd420f3213ea6bfee0e565185b661b | [
"BSD-3-Clause"
] | permissive | dlarrick/openapi-core | 679835b749d49f15da61f6f14df060e08010fee6 | 0865a4f54f38bdbe4a0de11addfa425c302aedfd | refs/heads/master | 2021-05-24T14:22:24.708899 | 2021-03-31T15:25:18 | 2021-03-31T15:25:18 | 253,604,031 | 0 | 0 | BSD-3-Clause | 2020-04-06T20:07:12 | 2020-04-06T20:07:11 | null | UTF-8 | Python | false | false | 281 | py | import attr
@attr.s
class TemplateResult(object):
pattern = attr.ib(default=None)
variables = attr.ib(default=None)
@property
def resolved(self):
if not self.variables:
return self.pattern
return self.pattern.format(**self.variables)
| [
"maciag.artur@gmail.com"
] | maciag.artur@gmail.com |
59c5558142ea9d114fe38247f09d705fa9cdba2d | c4a33b613ffc77dccf96d33c3a5cc127405c0e95 | /life/views.py | 4a22d705c1485f87c2059c53d66383416843042d | [] | no_license | tsokac2/new-irish-life | 25f49bd0b74dfa7c0a449772249f6cb51925b643 | d09934b60a1fd4fbd4540d412dc5dab726f5b502 | refs/heads/main | 2023-07-02T09:54:55.082587 | 2021-07-30T04:42:57 | 2021-07-30T04:42:57 | 379,245,725 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 304 | py | from django.shortcuts import render
from .models import Life
def life(request):
""" A view to return the Life template """
life_section = Life.objects.all()
template = 'life/life.html'
context = {
'life_section': life_section
}
return render(request, template, context) | [
"tsokac2@gmail.com"
] | tsokac2@gmail.com |
13f587518e71891fcfa8d3c3adc7a7c6bae59559 | 19236d9e966cf5bafbe5479d613a175211e1dd37 | /cohesity_management_sdk/models/principal.py | bb52d45d0c611c758c973745b3a5977b46a127fd | [
"MIT"
] | permissive | hemanshu-cohesity/management-sdk-python | 236c44fbd9604809027f8ddd0ae6c36e4e727615 | 07c5adee58810979780679065250d82b4b2cdaab | refs/heads/master | 2020-04-29T23:22:08.909550 | 2019-04-10T02:42:16 | 2019-04-10T02:42:16 | 176,474,523 | 0 | 0 | NOASSERTION | 2019-03-19T09:27:14 | 2019-03-19T09:27:12 | null | UTF-8 | Python | false | false | 2,583 | py | # -*- coding: utf-8 -*-
# Copyright 2019 Cohesity Inc.
class Principal(object):
"""Implementation of the 'Principal.' model.
Specifies information about a single Principal.
Attributes:
domain (string): Specifies the domain name of the where the principal'
account is maintained.
... | [
"ashish@cohesity.com"
] | ashish@cohesity.com |
4d781c9a4ed8adc2dc2d0cdeded54192e62e110c | 003ffcf8144565404636f3d74590a8d6b10a90a4 | /492-construct-the-rectangle/492-construct-the-rectangle.py | 563533a10a837712700af804ed787500a2abbf67 | [] | no_license | congve1/leetcode | fb31edf93049e21210d73f7b3e7b9b82057e1d7a | ce1e802b5052da2cdb919d6d7e39eed860e0b61b | refs/heads/master | 2020-05-13T19:19:58.835432 | 2019-05-06T00:44:07 | 2019-05-06T00:44:07 | 181,652,371 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 146 | py | class Solution(object):
def constructRectangle(self, area):
"""
:type area: int
:rtype: List[int]
"""
| [
"congve1@live.com"
] | congve1@live.com |
0312c4b5ff3caa1244cdf11977dc0ede1ef32a0c | 4554fcb85e4c8c33a5b5e68ab9f16c580afcab41 | /projecteuler/test_xiaobai_41.py | b6b7e14cd121456b1dd69da79870b0bbfcde910c | [] | no_license | xshen1122/Follow_Huang_Python | 12f4cebd8ddbc241a1c32cfa16288f059b530557 | fcea6d1361aa768fb286e1ef4a22d5c4d0026667 | refs/heads/master | 2021-01-01T04:37:31.081142 | 2017-12-05T07:31:34 | 2017-12-05T07:31:34 | 97,211,313 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 791 | py | # test_xiaobai_41.py
# coding: utf-8
'''
We shall say that an n-digit number is pandigital if it makes use of
all the digits 1 to n exactly once. For example, 2143 is a 4-digit
pandigital and is also prime.
What is the largest n-digit pandigital prime that exists?
'''
def checkPrime(number):
for i in range(2,nu... | [
"xueqin.shen@outlook.com"
] | xueqin.shen@outlook.com |
38bbe8aae94fbcd4dffe66ee910ac8d600b52462 | ae6f8eec0f08045624c6042b723f99695c5e446c | /backend/course/admin.py | d2dcfb95302bae425f5dc9bbdb332bbc87f07efe | [] | no_license | crowdbotics-apps/practual-life-21189 | a15aa6f2fe6cd5dc8feb6f6a214aed258509b4f7 | d33e5d7e5d5d9eba0c549a90cecdd96e90d5f8ae | refs/heads/master | 2022-12-29T12:45:45.469879 | 2020-10-06T20:41:31 | 2020-10-06T20:41:31 | 301,849,113 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 494 | py | from django.contrib import admin
from .models import (
Recording,
Event,
Subscription,
Course,
Group,
Module,
SubscriptionType,
Enrollment,
Category,
)
admin.site.register(Category)
admin.site.register(Module)
admin.site.register(Event)
admin.site.register(Subscription)
admin.site.r... | [
"team@crowdbotics.com"
] | team@crowdbotics.com |
882dc53ad67fb969d878846c3bdb805805d7b2b1 | 353b36f7907569945d9f956730b31463df8fa1f4 | /bpl_lib/transactions/Vote.py | 82a48eea0e3afe81b8c61396acbb0a027d422154 | [
"MIT"
] | permissive | DuneRoot/bpl-lib | 54b6a4387ecd404f1fcfa9d46b7ce68f136d90ac | 3ac1026cfc01ca5a71515caa5e352e4517cba0cc | refs/heads/master | 2020-03-23T19:56:49.291707 | 2019-02-20T19:08:55 | 2019-02-20T19:08:55 | 142,011,646 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,096 | py | from bpl_lib.transactions.Transaction import Transaction
from bpl_lib.helpers.Constants import TRANSACTION_TYPE
from bpl_lib.address.Address import Address
from bpl_lib.crypto.Keys import Keys
class Vote(Transaction):
def __init__(self, fee, _error_use_class_method=True):
"""
Creates a vote transa... | [
"johnyob132@gmail.com"
] | johnyob132@gmail.com |
1c03923938a1f6d9898a0b07bb9d16d14b83fab1 | 73e3990fdb1e38a053a047d204e26acb43d403e6 | /hooks/post_gen_project.py | 49fda6a120e8657cb108e878edb283020eea6efc | [
"MIT"
] | permissive | dunderlabs/dunder_cookiecutter_template | ad972870570463ff3aa68d887d7bf92b25ef9d11 | bda261b9f0e5c171470b9eaa80c416ba1a8e656d | refs/heads/master | 2021-01-10T12:21:11.022232 | 2016-04-06T19:48:15 | 2016-04-06T19:48:15 | 52,767,978 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,151 | py | import os
import hashlib
import random
import time
PROJECT_DIR = os.path.realpath(os.path.curdir)
# Use the system PRNG if possible
# https://github.com/django/django/blob/stable/1.9.x/django/utils/crypto.py#L18-L26
try:
random = random.SystemRandom()
using_sysrandom = True
except NotImplementedError:
im... | [
"pmazulo@gmail.com"
] | pmazulo@gmail.com |
5d280846dece158fbb8c53206b775dc82c7999b2 | 523fb785bda41e33546c929a5c2de6c93f98b434 | /LeetCode/208.implement-trie-prefix-tree.py | 24c8114b532aab37979451a9d92a433188a77e05 | [] | no_license | lizhe960118/TowardOffer | afd2029f8f9a1e782fe56ca0ff1fa8fb37892d0e | a0608d34c6ed96c9071cc3b9bdf70c95cef8fcbd | refs/heads/master | 2020-04-27T10:33:21.452707 | 2019-05-02T10:47:01 | 2019-05-02T10:47:01 | 174,259,297 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,385 | py | #
# @lc app=leetcode id=208 lang=python3
#
# [208] Implement Trie (Prefix Tree)
#
# https://leetcode.com/problems/implement-trie-prefix-tree/description/
#
# algorithms
# Medium (37.24%)
# Total Accepted: 167K
# Total Submissions: 448.5K
# Testcase Example: '["Trie","insert","search","search","startsWith","insert",... | [
"2957308424@qq.com"
] | 2957308424@qq.com |
8dad47d2b5726e1d51d8266f3a07f170aa7f9599 | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/verbs/_enmeshes.py | 8ab83b49bb6e84503d7c1bb5705287d69908efb8 | [
"MIT"
] | permissive | cash2one/xai | de7adad1758f50dd6786bf0111e71a903f039b64 | e76f12c9f4dcf3ac1c7c08b0cc8844c0b0a104b6 | refs/heads/master | 2021-01-19T12:33:54.964379 | 2017-01-28T02:00:50 | 2017-01-28T02:00:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 240 | py |
from xai.brain.wordbase.verbs._enmesh import _ENMESH
#calss header
class _ENMESHES(_ENMESH, ):
def __init__(self,):
_ENMESH.__init__(self)
self.name = "ENMESHES"
self.specie = 'verbs'
self.basic = "enmesh"
self.jsondata = {}
| [
"xingwang1991@gmail.com"
] | xingwang1991@gmail.com |
355814c9f4e4dbeb520f70c969d171be39f800ac | 37eda7bc5ea24e25a11d68c352b6c8e5a1ca2ae4 | /barkscape/server/base_runner.py | 4427eeda115344df19efe5ab9bef9147e3cddac5 | [] | no_license | bark-simulator/barkscape | d1c3668cc3cd9773380b4b2ed365f96ac01548c3 | dc5265ef8f970488646e6ae91cd47563a0ef11f1 | refs/heads/master | 2023-05-07T21:05:11.338776 | 2021-05-31T13:18:55 | 2021-05-31T13:18:55 | 352,927,882 | 3 | 3 | null | 2021-03-31T19:37:49 | 2021-03-30T08:33:01 | Python | UTF-8 | Python | false | false | 1,335 | py | # Copyright (c) 2021 fortiss GmbH
#
# Authors: Julian Bernhard, Klemens Esterle, Patrick Hart and
# Tobias Kessler
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
import sys, os, logging
import asyncio, json
import xviz_avs
from xviz_avs.server imp... | [
"patrickhart.1990@gmail.com"
] | patrickhart.1990@gmail.com |
ed5f51e53bd578380ba9d9e7121d1bb5587ed8b7 | 15f0514701a78e12750f68ba09d68095172493ee | /Python3/504.py | 866ce9e5a97deb28377cac17d45bd877278d543f | [
"MIT"
] | permissive | strengthen/LeetCode | 5e38c8c9d3e8f27109b9124ae17ef8a4139a1518 | 3ffa6dcbeb787a6128641402081a4ff70093bb61 | refs/heads/master | 2022-12-04T21:35:17.872212 | 2022-11-30T06:23:24 | 2022-11-30T06:23:24 | 155,958,163 | 936 | 365 | MIT | 2021-11-15T04:02:45 | 2018-11-03T06:47:38 | null | UTF-8 | Python | false | false | 927 | py | __________________________________________________________________________________________________
sample 24 ms submission
class Solution:
def convertToBase7(self, num: int) -> str:
if num < 0:
return '-' + self.convertToBase7(-num)
elif num >= 7:
return self.convertToBase7(n... | [
"strengthen@users.noreply.github.com"
] | strengthen@users.noreply.github.com |
97d89af9dfe4ef5088a883b84ba3d9d590cc0f80 | 80ae9b5cfb45b6e9cf7873ef7c46e17e117e4019 | /data/CodeChef/OMWG.py | 9be4d99b7ea695d8b09d5f1beca4eb627affcc1c | [] | no_license | Ritvik19/CodeBook | ef7764d89b790e902ede5802f36d5ca910d8a50e | 2b4ed7938bbf156553d6ba5cba6216449528f0fc | refs/heads/master | 2021-07-04T08:25:52.478719 | 2020-08-08T06:54:14 | 2020-08-08T06:54:14 | 138,744,302 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 144 | py | for i in range(int(input())):
n, m = input().split()
n, m = int(n), int(m)
score = (n-1) + (m-1) + ((n-1)*(m-1)*2)
print(score)
| [
"rastogiritvik99@gmail.com"
] | rastogiritvik99@gmail.com |
0e237708463f88a8264fb311025fee4c4efe4a2a | e71c8efe431fb5d8bf5076a054aeaeeccf3f6404 | /django_site/torah/templatetags/torah_filters.py | 252b9b0470086bd807c7f0db15ae01dbcaba3da9 | [] | no_license | suhailvs/torah | 2f587744da4f01719b5cc47b78a3da11cab032f2 | 0bc59099b0635c31b296a74b5bd9fbfb8798553a | refs/heads/master | 2021-11-10T23:12:54.719502 | 2021-11-06T12:26:48 | 2021-11-06T12:26:48 | 156,322,628 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,361 | py | from django import template
register = template.Library()
PATTERN = 'abgdefzhjiklmnxopsqrct'
fiej = lambda p: p.replace('f','v').replace('i','y').replace('e','H').replace('j','T')
@register.filter(name='get_letternumber')
def get_letternumber(letter):
"""
Return Number curresponding to PaleoHebrew letter
... | [
"suhailvs@gmail.com"
] | suhailvs@gmail.com |
92a55865ce6f0721b8e14204bf9d1663b2200a98 | 9405aa570ede31a9b11ce07c0da69a2c73ab0570 | /aliyun-python-sdk-ecs/aliyunsdkecs/request/v20140526/CreateDemandRequest.py | 6526229cdbc8a205e15c3771f39ddb7a45a15023 | [
"Apache-2.0"
] | permissive | liumihust/aliyun-openapi-python-sdk | 7fa3f5b7ea5177a9dbffc99e73cf9f00e640b72b | c7b5dd4befae4b9c59181654289f9272531207ef | refs/heads/master | 2020-09-25T12:10:14.245354 | 2019-12-04T14:43:27 | 2019-12-04T14:43:27 | 226,002,339 | 1 | 0 | NOASSERTION | 2019-12-05T02:50:35 | 2019-12-05T02:50:34 | null | UTF-8 | Python | false | false | 3,911 | py | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | [
"sdk-team@alibabacloud.com"
] | sdk-team@alibabacloud.com |
44b9f6666d722193eb9a18f604bc1c34b6dab2cd | c317f6a390de255540c2fb6a2e637c20bec03762 | /final/pwn-exzilla/container/server.py | 476db68bfe9316a904eccb9facdbd2bd25009136 | [] | no_license | Kodsport/sakerhetssm-2021-solutions | a7329ef22862bcfc4c970d43ac210bbe951cf3a8 | 85bc2aa619d55139acf7c91483259088329c15e2 | refs/heads/master | 2023-05-12T00:54:24.546337 | 2021-06-07T14:12:32 | 2021-06-07T14:12:32 | 353,975,490 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,576 | py | #!/bin/env python3
import string, json, base64, sys
sys.setrecursionlimit(30)
def f():
pass
CODE_TYPE = type(f.__code__)
FUNC_TYPE = type(f)
class NumberCell:
def __init__(self, n):
self.n = n
@staticmethod
def new():
while True:
try:
n = int(input("Cell v... | [
"drwal.mateusz@gmail.com"
] | drwal.mateusz@gmail.com |
999925a84d6f0ad85d37484c414d300427a63c09 | 54857571461a579bed30cee27871aaa5fe396bcc | /nltk-0.9.7/src/nltk/wordnet/__init__.py | 68c62dcb3b99882cb006753e2b13e209d780a975 | [] | no_license | ahmedBazaz/affective-text-classification | 78375182e800b39e0e309e8b469e273c0d9590f0 | 719e9b26e60863c620662564fb9cfeafc004777f | refs/heads/master | 2021-01-10T14:50:01.100274 | 2009-01-09T03:59:01 | 2009-01-09T03:59:01 | 48,296,612 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,177 | py | # Natural Language Toolkit: WordNet Interface
#
# Copyright (C) 2001-2008 NLTK Project
# Author: Oliver Steele <steele@osteele.com>
# Steven Bird <sb@csse.unimelb.edu.au>
# David Ormiston Smith <daosmith@csse.unimelb.edu.au>>
# URL: <http://www.nltk.org/>
# For license information, see LICENSE.TXT
"""
... | [
"tytung@6129d76e-ddfe-11dd-a37d-c9d1c40e0883"
] | tytung@6129d76e-ddfe-11dd-a37d-c9d1c40e0883 |
e28425c6be03c6d9956daa0eddac1c7fa2d826f5 | 816232db2f21e193612eaa60eda0d5897d31caaf | /COS_PRO/4차/6_자아도취수.py | edbcf8c6e72656e86c99fe03d7d9553c8241eb4a | [] | no_license | Juyoung4/StudyAlgorithm | a60bfa7657eac57f59200bfa204aff1ad27c79f8 | 4b190e0bfeb268bef4be00ae9bedd9ca8946fbd6 | refs/heads/master | 2023-08-31T04:37:07.422641 | 2021-09-27T08:38:09 | 2021-09-27T08:38:09 | 282,757,306 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 435 | py | def power(base, exponent):
val = 1
for i in range(exponent):
val *= base
return val
def solution(k):
answer = []
bound = power(10, k)
for i in range(bound // 10, bound):
current = i
calculated = 0
while current != 0:
calculated += (current%10)**k
current = current // 10
if calculated == i:
ans... | [
"vallot7@naver.com"
] | vallot7@naver.com |
0d34f49f9c5a57b17efc8069e4270058d795f429 | f95d0c620151ae16d0139f742b461e411ecf1f7c | /assignments/assignment2/cs231n/optim.py | a337f3432eaf4530675c0b50c45c671825d0b4c6 | [] | no_license | chintanbetrabet/CS231n | 5116925618df18a23bc5a99d5003f3a6273e3f95 | 96cd5bb8ff32a80fcf5fe82e485669187696f267 | refs/heads/master | 2021-07-10T04:53:51.654828 | 2017-10-07T18:53:39 | 2017-10-07T18:53:39 | 104,069,703 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,106 | py | import numpy as np
"""
This file implements various first-order update rules that are commonly used for
training neural networks. Each update rule accepts current weights and the
gradient of the loss with respect to those weights and produces the next set of
weights. Each update rule has the same interface:
def updat... | [
"chintanbetrabet@gmail.com"
] | chintanbetrabet@gmail.com |
5c4cd537a6ff217add8a3efe464d8da6c2abbd93 | b726ec9abfbd53f03fa96ccd336ed165aaa306c8 | /find_max_common_subsequence.py | 16249cff0778023e0896a80ee83635bd50f86092 | [] | no_license | hcxie20/Algorithm | de0256aa3acacf96833e46a0b0c66517dae6cbfd | cace01b8441a8a1923b827de844965874e790d77 | refs/heads/master | 2021-08-15T23:18:00.364329 | 2020-12-02T05:53:32 | 2020-12-02T05:53:32 | 228,120,962 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 909 | py | class Solution(object):
def __init__(self, str1, str2):
self.value = 0
self.str = ""
if str1 and str2:
dp = [[0 for i in range(len(str1) + 1)] for j in range(len(str2) + 1)]
for i in range(1, len(str2) + 1):
for j in range(1, len(str1) + 1):
... | [
"="
] | = |
7c04a3f7c065a01a0d8e43922f46a8251de774d9 | 54fc549a8af5bad5cfeb97af92a02448297f1ea9 | /src/gather_reviews/template.py | b60cad3a592d610f9ae8012b9ac6cb7da4f2f52a | [] | no_license | ace-racer/ReviewAnalysis | 35659ba09917a345edb3e3701aa12ae78602333b | 95fee3407791b5bbbc47619b06e603689e2249ed | refs/heads/master | 2020-07-26T06:10:05.563327 | 2019-10-26T14:58:12 | 2019-10-26T14:58:12 | 208,559,897 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 252 | py | class ReviewTemplate:
def __init__(self):
self.rating = 0
self.title = ""
self.review_text = ""
self.reviewer = ""
self.review_date = ""
self.review_upvotes = 0
self.review_downvotes = 0
| [
"anuragchatterjee92@gmail.com"
] | anuragchatterjee92@gmail.com |
b87a8135b8a13d1fa8a6878cd59447c839828a69 | e53b7bbcea1a6f06175a9f14e31d5725fe80e804 | /Question_100/Q15_SobelFilter.py | d31f99bef7a488d33314a96b6c743a73bd861769 | [] | no_license | Zpadger/ObjectDetection | 5777c8d78c71dca1af6bccf25b01288dca7100c3 | aa0193a38f3d5c3a318501c3a59e89b73d3e244b | refs/heads/master | 2020-08-16T02:58:45.412713 | 2019-12-14T08:18:51 | 2019-12-14T08:18:51 | 215,446,364 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,995 | py | import cv2
import numpy as np
# Gray scale
def BGR2GRAY(img):
b = img[:, :, 0].copy()
g = img[:, :, 1].copy()
r = img[:, :, 2].copy()
# Gray scale
out = 0.2126 * r + 0.7152 * g + 0.0722 * b
out = out.astype(np.uint8)
return out
# sobel filter
def sobel_filter(img, K_size=3):
if len(i... | [
"noreply@github.com"
] | Zpadger.noreply@github.com |
ecf51cb881137d1f924dbc463f597d153a029da8 | 641ac23338d100a4aea52b8246c924f219a4b276 | /fabfile.py | 6ca0d13fd156aefa0294704b471dc351415f5463 | [] | no_license | loogica/videos | e1557f38913cdeb9c48d478a420c25ea6aac33ef | 2ae2817f4630d5c351a510b81a6c007dbfdda09a | refs/heads/master | 2021-03-13T00:04:20.355363 | 2013-08-17T22:24:04 | 2013-08-17T22:24:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | true | false | 530 | py | from fabric.api import env, run, put, local, cd, sudo
env.hosts = ['loogica.net']
def zip_output():
local('zip -r blog_static.zip output')
def send_data():
put('blog_static.zip', '/tmp')
def remote_deploy_zip():
with cd('/tmp'):
sudo('unzip blog_static.zip')
sudo('mv output/ /opt/apps/')... | [
"felipecruz@loogica.net"
] | felipecruz@loogica.net |
a78b0ad15ac86982ce568a9763b73aef095c2af4 | ef1458fae5fbd6b7a9281ccd4d9bc8289f3dd38b | /examples_UQ/MM2_surrogate_diam_batchgrid.py | f2a70af511b46ac0ec7e3de95da9b74e99547a93 | [
"BSD-3-Clause"
] | permissive | vt100/mystic | a42910537c3de90d1c2a5637bad5d866308e8863 | 7589eee4b9a7cb6056114ee6770579d173d9007b | refs/heads/master | 2021-01-17T22:28:57.743493 | 2015-07-17T15:25:35 | 2015-07-17T15:25:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,409 | py | #!/usr/bin/env python
#
# Author: Mike McKerns (mmckerns @caltech and @uqfoundation)
# Copyright (c) 2009-2015 California Institute of Technology.
# License: 3-clause BSD. The full license text is available at:
# - http://trac.mystic.cacr.caltech.edu/project/mystic/browser/mystic/LICENSE
############################... | [
"mmckerns@968178ea-60bd-409e-af13-df8a517b6005"
] | mmckerns@968178ea-60bd-409e-af13-df8a517b6005 |
31f23cfa6c6ca1b240f30f9db28cd4e53accc1dc | d9e26e516ab3863b6e7d00c4e3cdecf1af7028eb | /tests/test_parsers/test_xaf_association_parser.py | 3a3efa1edd3f4a9aaba83169a8a2fb2a24c27680 | [
"Apache-2.0"
] | permissive | INCATools/ontology-access-kit | 2f08a64b7308e8307d1aaac2a81764e7d98b5928 | 8d2a124f7af66fe2e796f9e0ece55585438796a5 | refs/heads/main | 2023-08-30T14:28:57.201198 | 2023-08-29T17:40:19 | 2023-08-29T17:40:19 | 475,072,415 | 67 | 15 | Apache-2.0 | 2023-09-07T01:06:04 | 2022-03-28T15:50:45 | Jupyter Notebook | UTF-8 | Python | false | false | 949 | py | import logging
import unittest
from oaklib.datamodels.association import Association
from oaklib.parsers.parser_base import ColumnReference
from oaklib.parsers.xaf_association_parser import XafAssociationParser
from tests import INPUT_DIR
GAF = INPUT_DIR / "test-uniprot.gaf"
class XafAssociationParserTest(unittest.... | [
"noreply@github.com"
] | INCATools.noreply@github.com |
f0a8b55b7fdb9455813100ac46d0ddf18ded61b7 | 2b42c0f490128aab8aacf9ad572d280e7b702d92 | /postgresqleu/confreg/management/commands/confreg_expire_waitlist.py | 22da3c271f3d6e29755039f78dc2b8cf352ec509 | [] | no_license | danielgustafsson/pgeu-website | fc5bd38749aaf4bbdd4a112307b856e1fbc777b3 | 202e5c5118d12727902b4adc88eb465330b9705d | refs/heads/master | 2021-01-18T02:37:08.440516 | 2016-07-19T21:41:49 | 2016-07-19T21:41:49 | 63,783,904 | 0 | 0 | null | 2016-07-20T13:30:56 | 2016-07-20T13:30:55 | null | UTF-8 | Python | false | false | 2,470 | py | #!/usr/bin/env python
#
# Expire waitlist offers that have expired, so others can get the
# seats.
#
# Copyright (C) 2015, PostgreSQL Europe
#
from django.core.management.base import BaseCommand, CommandError
from django.db import transaction
from django.conf import settings
from datetime import datetime
from django.... | [
"magnus@hagander.net"
] | magnus@hagander.net |
ca6779ba52b3bd0f2ee2aaa437414e97d2550a24 | a7b66311c2ce113789933ec3162f1128b2862f13 | /app/waterQual/30yr/reason/cyclicCmap.py | c7e0ae852714e2a90f261dece677fc8ec7437826 | [
"MIT"
] | permissive | ChanJeunlam/geolearn | 214b2c42359ea1164b39117fad2d7470adeb6d35 | 791caa54eb70920823ea7d46714dc8a3e7fa7445 | refs/heads/master | 2023-07-16T04:13:15.526364 | 2021-08-16T05:24:18 | 2021-08-16T05:24:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 776 | py | import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
sd = np.datetime64('2000-01-01')
ed = np.datetime64('2000-12-31')
t = pd.date_range(sd, ed)
td = t.dayofyear.values-1
fig, ax = plt.subplots(1, 1)
nt = td.max()
# tLst = ['2000-01-01', '2000-03-01', '2000-06-01', '2000-09-01']
tLst = ['2000-{:02d}... | [
"geofkwai@gmail.com"
] | geofkwai@gmail.com |
830c884047ab74b87a3b7d60e5412388c2189e4c | 163bbb4e0920dedd5941e3edfb2d8706ba75627d | /Code/CodeRecords/2968/60797/295581.py | e68e8eb6ee4d1332321e959eacdf1950a4ee97e5 | [] | no_license | AdamZhouSE/pythonHomework | a25c120b03a158d60aaa9fdc5fb203b1bb377a19 | ffc5606817a666aa6241cfab27364326f5c066ff | refs/heads/master | 2022-11-24T08:05:22.122011 | 2020-07-28T16:21:24 | 2020-07-28T16:21:24 | 259,576,640 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 775 | py | class Solution:
def isPalindrome(self, data):
for i in range(len(data)):
if data[i]!=data[len(data)-1-i]:
return False
return True
def find(self, data):
re = 0
for i in range(len(data)):
for i in range(i,len(data))... | [
"1069583789@qq.com"
] | 1069583789@qq.com |
c11c53b590a3c16bb3b7c28cae7424a53dea3d87 | de24f83a5e3768a2638ebcf13cbe717e75740168 | /moodledata/vpl_data/94/usersdata/169/57980/submittedfiles/mediaLista.py | c8d5077de447c7b9ad6542447f7fcc7e6877b905 | [] | no_license | rafaelperazzo/programacao-web | 95643423a35c44613b0f64bed05bd34780fe2436 | 170dd5440afb9ee68a973f3de13a99aa4c735d79 | refs/heads/master | 2021-01-12T14:06:25.773146 | 2017-12-22T16:05:45 | 2017-12-22T16:05:45 | 69,566,344 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 407 | py | # -*- coding: utf-8 -*-
def média(lista):
soma=0
for i in range(0,len(lista),1):
soma=soma+lista[i]
resultado=soma/len(lista)
return resultado
n=int(input('Digite a Quantidade de Números:'))
l1=[]
for i in range(0,n,1):
v=float(input('Digite o Valores de Inteiros da Lista:'))
l1.append(... | [
"rafael.mota@ufca.edu.br"
] | rafael.mota@ufca.edu.br |
61e71bab3030183eea612146af02e8cf41f6e23b | af7ab3c9d189caf4a22b2a83a03da4560dba6166 | /generated/administration_data/OrderStateNVL.py | c1789a2ccf2eca631fc260554e312bc933aef3d5 | [] | no_license | Eggwise/unit4_python_api | 43418d16d84abb73ddd843b8b268883f02ff996b | 421195392e408bd9e14bda0851817c5ab835ebaf | refs/heads/master | 2021-01-15T13:43:21.486918 | 2016-09-19T14:10:02 | 2016-09-19T14:10:02 | 68,611,588 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 456 | py | import requests, json
from generated.base.unit4_base import Unit4Base
class OrderStateNVL(Unit4Base):
def get_orderStateNVL(self, database, ):
request_args = locals()
url_template = 'api/{database}/OrderStateNVL'
url = url_template.format(**request_args)
#print(url)
url = ... | [
"dev@eggwise.com"
] | dev@eggwise.com |
0df5002081686537d5ff5e42c6673d79d491c180 | 473fc28d466ddbe9758ca49c7d4fb42e7d82586e | /app/src/main/java/com/syd/source/aosp/external/nanopb-c/tests/package_name/SConscript | 8f1b9021d3f9cf30f232d3b3a4fab1b5ba771c6a | [
"Zlib"
] | permissive | lz-purple/Source | a7788070623f2965a8caa3264778f48d17372bab | e2745b756317aac3c7a27a4c10bdfe0921a82a1c | refs/heads/master | 2020-12-23T17:03:12.412572 | 2020-01-31T01:54:37 | 2020-01-31T01:54:37 | 237,205,127 | 4 | 2 | null | null | null | null | UTF-8 | Python | false | false | 1,351 | # Check that alltypes test case works also when the .proto file defines
# a package name.
Import("env")
# Build a modified alltypes.proto
def modify_proto(target, source, env):
'''Add a "package test.package;" directive to the beginning of the .proto file.'''
data = open(str(source[0]), 'r').read()
open(s... | [
"997530783@qq.com"
] | 997530783@qq.com | |
cfe3d298f48a17667eeabcf5f110cf65a8e926b9 | 52b79e4cd1e26969a3ebb3bca8620519071bea98 | /answers/05_basic_scripts/task_5_2a.py | 83e4f23de538e9e128e63d8b8691d6ce8a62b918 | [] | no_license | hariram32/pyneng-answers-en | 631bc149b8a219a2de86de82681ffba3d1ff30ee | 84b7240b00d3a4ab9011952db662f716d1cd31b8 | refs/heads/main | 2023-03-16T00:12:38.954431 | 2021-03-09T15:40:10 | 2021-03-09T15:40:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,401 | py | # -*- coding: utf-8 -*-
"""
Task 5.2a
Copy and modify the script from task 5.2 so that, if the user entered a host address
rather than a network address, convert the host address to a network address
and print the network address and mask, as in task 5.2.
An example of a network address (all host bits are equal to ze... | [
"nataliya.samoylenko@gmail.com"
] | nataliya.samoylenko@gmail.com |
43559fe498959af1ed9d3b2c78c4f80b28e8a436 | f384d811159201c1d375cc36b2402c643b7cd66c | /bughipster/website/login.py | cff3e38fd64a121e83e8073cb6831e46721eaad6 | [
"BSD-3-Clause"
] | permissive | pombredanne/django-bug-hipster | f23202a78a99ef0487fd05e7cae7882b1696a1ad | 5e9cfe1efd22494b8c82176a5d7f145f899f2ed2 | refs/heads/master | 2021-01-15T11:33:43.420214 | 2015-06-10T20:21:19 | 2015-06-10T20:21:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,144 | py | """
bughipster.website.login
~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2015 by Xavier Ordoquy, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from django import http
from django import forms
from django.utils.translation import ugettext_lazy as _
from django.contrib.auth import (
a... | [
"xordoquy@linovia.com"
] | xordoquy@linovia.com |
873ce238a7dfd0ef0948e5a9922e5e08f39636e5 | 39225163672910ad704e730e20d21a54c8e3be0f | /examples/demo_skyview.py | 36fa93ae3c25f1dcce418ccc803ded48a25244ea | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | astrofrog/pywcsgrid2 | 4f422962523a928b4bacf259e7241e1eadcb50cc | d861e5a4987848a2ba3bed6b0d1278457589071a | refs/heads/master | 2021-01-21T00:52:49.615248 | 2012-04-16T15:06:50 | 2012-04-16T15:06:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,682 | py | import pyfits
import matplotlib.pyplot as plt
import matplotlib.cm as cm
from mpl_toolkits.axes_grid1.axes_grid import AxesGrid
#from pywcsgrid2.axes_wcs import GridHelperWcs, AxesWcs
import pywcsgrid2
# read in the first image
xray_name="pspc_skyview.fits"
f_xray = pyfits.open(xray_name)
header_xray = f_xray[0].head... | [
"lee.j.joon@gmail.com"
] | lee.j.joon@gmail.com |
13d8e1126016f032ec40167184632c2550e1b5fa | ec99f2c09b2c9a3860a2e5fdea061089cd147482 | /webprogrammering/docs/eks4/eks4.py | 1c9c60da03a7b5752964059290b3911bfa5a2618 | [] | no_license | sprotg/2019_3d | 752d3cc19cbff99effeccc9207d5ca26de4ad97b | 0250f9cd8045272ca6bf58dc59981adf28371c51 | refs/heads/master | 2020-07-05T16:03:03.465870 | 2020-03-16T13:49:47 | 2020-03-16T13:49:47 | 202,692,753 | 8 | 1 | null | null | null | null | UTF-8 | Python | false | false | 416 | py | from flask import Flask
from flask import render_template
from flask import request
app = Flask(__name__)
@app.route("/")
@app.route('/index')
def index():
return render_template('formular.html')
@app.route("/modtag_data", methods=['POST'])
def modtag():
modtaget_navn = request.form['navn']
return render... | [
"spr@sde.dk"
] | spr@sde.dk |
ee2addb23de8f4b619906a7926cf93adef98483b | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03681/s217062643.py | 4121026c13621b021fe355d631d8f4c15cb0ffe3 | [] | no_license | Aasthaengg/IBMdataset | 7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901 | f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8 | refs/heads/main | 2023-04-22T10:22:44.763102 | 2021-05-13T17:27:22 | 2021-05-13T17:27:22 | 367,112,348 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 303 | py | import math
N_inu, M_saru = map(int, input().split())
d = abs(N_inu - M_saru)
if (d > 1):
ans = 0
else:
if (d == 1):
ans = math.factorial(N_inu) * math.factorial(M_saru)
else:
ans = 2 * math.factorial(N_inu) * math.factorial(M_saru)
ans = ans % (10 ** 9 + 7)
print(ans) | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
917f40447e4de7c7a4b51c43d671f0a910974707 | 85fc4f742f16befdd1cea2bc0dcfb57f1f8107d8 | /tests/cli/test_detect_embargo.py | 8c129519d22286d8f54c8825cd5d2281aeb09b28 | [
"LGPL-3.0-only",
"Apache-2.0"
] | permissive | sdodson/doozer | fcd01e6775478dc02c3703774197a41b755ce033 | 1522990fa987c6f1b4eaa500c63772ac0e0768b5 | refs/heads/master | 2023-01-19T16:06:26.801202 | 2020-08-25T20:10:38 | 2020-08-25T20:10:38 | 291,060,114 | 0 | 0 | Apache-2.0 | 2020-08-28T13:57:32 | 2020-08-28T13:57:31 | null | UTF-8 | Python | false | false | 6,526 | py | import io
import json
from unittest import TestCase
from unittest.mock import MagicMock, patch
import yaml
from doozerlib.cli import detect_embargo
class TestDetectEmbargoCli(TestCase):
def test_detect_embargoes_in_nvrs(self):
builds = [
{"id": 1, "nvr": "foo-1.2.3-1.p0"},
{"id":... | [
"yuxzhu@redhat.com"
] | yuxzhu@redhat.com |
7e2eb39af0422a8717078f0128efb39342ff9ce9 | f13acd0d707ea9ab0d2f2f010717b35adcee142f | /AtCoder_Virtual_Contest/macle_20220726/a/main.py | 4f52c6d938d8e5669ac0da85c6db79449fbe884d | [
"CC0-1.0",
"LicenseRef-scancode-public-domain"
] | permissive | KATO-Hiro/AtCoder | 126b9fe89fa3a7cffcbd1c29d42394e7d02fa7c7 | bf43320bc1af606bfbd23c610b3432cddd1806b9 | refs/heads/master | 2023-08-18T20:06:42.876863 | 2023-08-17T23:45:21 | 2023-08-17T23:45:21 | 121,067,516 | 4 | 0 | CC0-1.0 | 2023-09-14T21:59:38 | 2018-02-11T00:32:45 | Python | UTF-8 | Python | false | false | 433 | py | # -*- coding: utf-8 -*-
def main():
from collections import Counter
import sys
input = sys.stdin.readline
n, m = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
c = Counter(a + b)
ans = list()
for key, value in c.items():
... | [
"k.hiro1818@gmail.com"
] | k.hiro1818@gmail.com |
5d6d47498a0f1f651904fa28ec48d7fc3776e771 | 98c6ea9c884152e8340605a706efefbea6170be5 | /examples/data/Assignment_3/fnkgar002/question1.py | 4131eddc1868a0edb6d9606e520abe1fb271fe61 | [] | no_license | MrHamdulay/csc3-capstone | 479d659e1dcd28040e83ebd9e3374d0ccc0c6817 | 6f0fa0fa1555ceb1b0fb33f25e9694e68b6a53d2 | refs/heads/master | 2021-03-12T21:55:57.781339 | 2014-09-22T02:22:22 | 2014-09-22T02:22:22 | 22,372,174 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 171 | py | height = eval(input("Enter the height of the rectangle: \n"))
width = eval(input("Enter the width of the rectangle: \n"))
for i in range(height):
print(width*"*") | [
"jarr2000@gmail.com"
] | jarr2000@gmail.com |
d5c8b24693ea9229cea030cafd7ed4a4cd3d7633 | 5ac726f23d0490d3d43819578cca590b62d0ff02 | /wise_intern/Tracker/views.py | 5b6bec7f3785285577f5079f1593baeedcb6eba6 | [] | no_license | youssriaboelseod/Software-HumanResources | 52ab324bf43479d8bea20690f71690615c68ef25 | 821fdf195915af3f6b6ec16ef2fb6d9f70d986f7 | refs/heads/master | 2022-12-28T01:29:52.310176 | 2020-10-10T05:05:22 | 2020-10-10T05:05:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,707 | py | from django.shortcuts import render
from django.contrib.auth.mixins import LoginRequiredMixin
from .models import Tracker
from django.contrib.auth.decorators import login_required
from django.views.generic import CreateView, DetailView, UpdateView, DeleteView
from Job_openings.models import Jobb
from Candidate.models i... | [
"bhatnagar.aman1998@gmail.com"
] | bhatnagar.aman1998@gmail.com |
fdc8c637b2a2360cfe62203c066d247991a0ccea | 02dde23ab7414142d9df823b873b5b2c87a691b9 | /cinemago_app/app/__init__.py | 3ac0b56ad4140b6fe00e3b6625258701d241f878 | [] | no_license | andrei-papou/cinemago | a4094b80a18dcec0072a1a20a5b8aa51c6da522f | 580c71f0737de1070a0332d9c154100acbb22303 | refs/heads/master | 2021-05-30T04:51:16.196188 | 2016-01-18T19:37:19 | 2016-01-18T19:37:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,721 | py | from schematics.exceptions import ValidationError
from itsdangerous import BadSignature, SignatureExpired
from flask import Flask
from flask.ext.sqlalchemy import SQLAlchemy
from flask.ext.mail import Mail
from flask.ext.restful import Api
from config import config
from .exceptions import (
BadRequest,
Unauthor... | [
"popow.andrej2009@yandex.ru"
] | popow.andrej2009@yandex.ru |
a64f634024c805d7142b15712548433cb9621863 | e299ad494a144cc6cfebcd45b10ddcc8efab54a9 | /test/python_api/default-constructor/sb_breakpoint.py | 2bdc539a001dcdeae2d958de621b5ef705e55df6 | [
"NCSA"
] | permissive | apple-oss-distributions/lldb | 3dbd2fea5ce826b2bebec2fe88fadbca771efbdf | 10de1840defe0dff10b42b9c56971dbc17c1f18c | refs/heads/main | 2023-08-02T21:31:38.525968 | 2014-04-11T21:20:22 | 2021-10-06T05:26:12 | 413,590,587 | 4 | 1 | null | null | null | null | UTF-8 | Python | false | false | 902 | py | """
Fuzz tests an object after the default construction to make sure it does not crash lldb.
"""
import sys
import lldb
def fuzz_obj(obj):
obj.GetID()
obj.ClearAllBreakpointSites()
obj.FindLocationByAddress(sys.maxint)
obj.FindLocationIDByAddress(sys.maxint)
obj.FindLocationByID(0)
obj.GetLoca... | [
"91980991+AppleOSSDistributions@users.noreply.github.com"
] | 91980991+AppleOSSDistributions@users.noreply.github.com |
579959a5d4e3ef7cb1e17f81d9439f8a8a0d30d7 | e987cd566edc75997f9b02377514d4f3a0dba12c | /sys/src/Python/distribTools/__init__.py | 8efdcba9816036b872c9cde5b2439ecd585cba74 | [] | no_license | 7u83/maxdb-buildtools | f942adff2cd55d0a046b6ef3e18f6645b011a26e | ce9a56943f6195d6755e983035aa96cbe95e6cb2 | refs/heads/master | 2020-05-04T18:23:30.849371 | 2015-02-15T19:25:49 | 2015-02-15T19:25:49 | 30,428,297 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 903 | py |
#
# ========== licence begin LGPL
# Copyright (C) 2002 SAP AG
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option)... | [
"7u83@mail.ru"
] | 7u83@mail.ru |
18be60559ba6c0ac41c4a74f49b594fc1ad3161c | b7d1922311613b2dc47bc5c0284ff48bc5294f8c | /03-Lists_Basics/Exercises/More_exercises/1-Zeros_to_Back.py | bf646b60f3126a824475643c5c4c6ee8c218e616 | [
"MIT"
] | permissive | eclipse-ib/Software-University-Fundamentals_Module | c32bfa5f249f79de622016269a026d1114341e11 | 994ef75c70d1bae8e615dbb789aeffd6e0a42c34 | refs/heads/main | 2023-01-30T08:51:26.239640 | 2020-12-13T19:54:18 | 2020-12-13T19:54:18 | 306,145,841 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 236 | py | numbers = input().split(", ")
new_numbers = []
for i in numbers:
if int(i) == 0:
pass
else:
new_numbers.append(int(i))
for i in numbers:
if int(i) == 0:
new_numbers.append(0)
print(f"{new_numbers}")
| [
"65770519+eclipse-ib@users.noreply.github.com"
] | 65770519+eclipse-ib@users.noreply.github.com |
766c4da836e8e2e56ca4b04d73c586eff2605af9 | 54ab0f79f5d68f4732ca7d205f72ecef99862303 | /torch/jit/_monkeytype_config.py | 9957541ff25d17f5d68863e9405b366e5fcaa0e9 | [
"BSD-3-Clause",
"LicenseRef-scancode-generic-cla",
"BSL-1.0",
"Apache-2.0",
"BSD-2-Clause"
] | permissive | csarofeen/pytorch | a9dd0f8ffa0642d72df2d5e109a8b4d9c2389cbc | e8557ec5e064608577f81e51ccfe7c36c917cb0f | refs/heads/devel | 2023-04-30T02:42:13.558738 | 2023-03-14T00:50:01 | 2023-03-14T00:50:01 | 88,071,101 | 35 | 10 | NOASSERTION | 2023-06-21T17:37:30 | 2017-04-12T16:02:31 | C++ | UTF-8 | Python | false | false | 7,129 | py |
import torch
import inspect
import typing
import pathlib
import sys
from typing import Optional, Iterable, List, Dict
from collections import defaultdict
from types import CodeType
_IS_MONKEYTYPE_INSTALLED = True
try:
import monkeytype # type: ignore[import]
from monkeytype import trace as monkeytype_trace
... | [
"facebook-github-bot@users.noreply.github.com"
] | facebook-github-bot@users.noreply.github.com |
c72d6c6b6adc5ad4348b71de4fe532736a5db64c | 26ca1e0906feece27896bd267a1f58882fcb0513 | /lessons/12.12.2019/zipfunction-demo.py | 253272c92304aed5021a4a824beef37c50137168 | [] | no_license | icecore2/python-training2019 | 092984c6dec1b05e70f9f899ee213d126c45ff63 | ee39f93adabab506c9eef68c5e686ddb59953de9 | refs/heads/master | 2020-09-02T21:19:27.959213 | 2020-04-23T20:06:08 | 2020-04-23T20:06:08 | 219,306,742 | 0 | 2 | null | 2020-01-17T15:07:06 | 2019-11-03T13:40:56 | Python | UTF-8 | Python | false | false | 181 | py | names = ["Carpetta", "Shalva", "Arona"]
prices = [990,1990,80]
data = zip(names, prices)
print(data)
print(type(data))
print("------------------")
for ob in data:
print(ob) | [
"admin@example.com"
] | admin@example.com |
6b1f643b86225f77adeb9ea7b55566123779f3d2 | a140fe192fd643ce556fa34bf2f84ddbdb97f091 | /.history/파일입출력02_20200705144347.py | 8558bc1c70efc04967999b44f14cca489e0fd51c | [] | no_license | sangha0719/py-practice | 826f13cb422ef43992a69f822b9f04c2cb6d4815 | 6d71ce64bf91cc3bccee81378577d84ba9d9c121 | refs/heads/master | 2023-03-13T04:40:55.883279 | 2021-02-25T12:02:04 | 2021-02-25T12:02:04 | 342,230,484 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 264 | py | # score_file = open("score.txt", "r", encoding="utf8")
# while True:
# line = score_file.readline()
# if not line:
# break
# print(line, end="")
# score_file.close()
score_file = open("score.txt", "r", encoding="utf8")
d="")
score_file.close() | [
"sangha0719@gmail.com"
] | sangha0719@gmail.com |
6d7b55b2264e8161c0ba4c4e3120b5ec27d882dd | 36bab4f5fd13efadd53e8a9eb5060945c36cf3fd | /src/utils/model_info.py | c25771bbfdf7d5c768b878e4a6b891aa5a55897f | [] | no_license | CheungBH/TimeSequenceProcess | a19530133a84518a472fd9693f2d13287eef632a | 8690cbc6c371bccc37c2e1c1ecd58cd5e69018b4 | refs/heads/master | 2022-07-16T10:52:13.885456 | 2020-08-07T13:37:58 | 2020-08-07T13:37:58 | 242,521,733 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,503 | py | # Code from https://github.com/simochen/model-tools.
import numpy as np
import time
import torch
import torchvision
from torch.autograd import Variable
from config.config import device
def print_model_param_nums(model, multiply_adds=True):
total = sum([param.nelement() for param in model.parameters()])
return... | [
"534660436@qq.com"
] | 534660436@qq.com |
53784f03ce7829e4fb56c21ce8b2f078c69eb7af | 6c21316d93c94766d4dbbe891643ceb0eca8630f | /appendix/1/keras/02_save_model_keras.py | 6aa98c4a8f3e279649dd76087868dba2b8d5ff21 | [] | no_license | takseki/deeplearning-tensorflow-keras | 39beef782a2026aaa5c8060f9f3cb955d3db1da2 | a6efd8df8408ddaac3ed52b1037a736aa70d44ff | refs/heads/master | 2021-05-15T04:05:51.143111 | 2018-01-29T12:08:10 | 2018-01-29T12:08:10 | 119,783,663 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,053 | py | import os
import numpy as np
from keras.models import Sequential
from keras.layers.core import Dense, Activation, Dropout
from keras.optimizers import Adam
from keras.callbacks import ModelCheckpoint
from keras import backend as K
from sklearn import datasets
from sklearn.model_selection import train_test_split
import ... | [
"me@yusugomori.com"
] | me@yusugomori.com |
13860fa1eafedf68adeeb3a5c6820df45f2e07eb | 578bdcf2720805c1075ba348764983d99031911f | /Udacity/Project2/BS_first_and_last.py | 3f009075ede678361730daef255531c39bb073ec | [] | no_license | mrudula-pb/Python_Code | 994de4720289ded0a55017407d27b1d0f0b08c65 | 0dcdc6589d3c614bd1e6a03aa5c2b55664b9e6b2 | refs/heads/master | 2023-03-25T16:52:27.420925 | 2021-03-22T21:40:37 | 2021-03-22T21:40:37 | 350,476,487 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,751 | py | # Given a sorted array that may have duplicate values, use binary search to find the first and last indexes of a given value.
#
# For example, if you have the array [0, 1, 2, 2, 3, 3, 3, 4, 5, 6] and the given value is 3, the answer will be [4, 6] (because the value 3 occurs first at index 4 and last at index 6 in the ... | [
"mrudulapolavarapu@gmail.com"
] | mrudulapolavarapu@gmail.com |
9b577efe3af43ad442b2ecbcdc2087ad0a041ca3 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02713/s488912314.py | 5f097787063f1a8f1bf781024c3dc61745246b46 | [] | no_license | Aasthaengg/IBMdataset | 7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901 | f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8 | refs/heads/main | 2023-04-22T10:22:44.763102 | 2021-05-13T17:27:22 | 2021-05-13T17:27:22 | 367,112,348 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 176 | py | import math
k=int(input())
n=0
for a in range(1,k+1):
for b in range(1,k+1):
d = math.gcd(a,b)
for c in range(1,k+1):
n+=math.gcd(d,c)
print(n) | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
2d948670ff31eb0aacdf2b5fada3761978d73a49 | 02fc83e331257882b7701d347fe30bbc934fbc1e | /tk.py | fac1768ec8e270cdbf54c7e0185ff605fc4baaec | [
"Unlicense"
] | permissive | tankle/GoodTranslate | 991dc71190a1e909f48a91799ab5b141b46de8d8 | 5fec6791e6492cb1c181e4f866e1e0fb45e7ab29 | refs/heads/master | 2021-01-18T20:32:52.755140 | 2016-05-12T03:04:16 | 2016-05-12T03:04:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,205 | py | import re
import sys
import ctypes
try:
import urllib2 as request
except:
from urllib import request
def get_d1():
req = request.Request(url='http://translate.google.com/', headers={'User-Agent': 'Mozilla/5.0'})
t = request.urlopen(req).read().decode('utf8')
a, b, h = re.search(r"TKK=eval\(\'\(\(f... | [
"scturtle@gmail.com"
] | scturtle@gmail.com |
7c97a5eae902c35c8233bee53f36ce711c8da55f | ccb4cb8358fb896a88bbf0c6771462d898d7a492 | /examples/venus_evening_chart.py | bc89920d2db7aab3a46d0afccdcec128b4e5fe3d | [
"MIT"
] | permissive | skyfielders/python-skyfield | a30d34a680dcd285bc8cd39cedc2629f792d5821 | 61fb6324e312715e20aa75ec24dc87286442be1a | refs/heads/master | 2023-08-31T13:10:32.863587 | 2023-08-10T14:25:56 | 2023-08-10T14:25:56 | 7,924,113 | 1,040 | 204 | MIT | 2023-08-28T19:44:50 | 2013-01-30T21:19:21 | Python | UTF-8 | Python | false | false | 3,584 | py | import numpy as np
import matplotlib.pyplot as plt
from matplotlib.colors import LinearSegmentedColormap
from skyfield import almanac
from skyfield.api import load, wgs84
from skyfield.magnitudelib import planetary_magnitude
MONTH_NAMES = '0 Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec'.split()
# Figure out the ti... | [
"brandon@rhodesmill.org"
] | brandon@rhodesmill.org |
67b744eb1a386ef9781575699805fb61d73dec1b | 6a0a634265957e9dcd26bc80e3304e107fb004d0 | /venvflask/lib/python3.7/site-packages/eth_account/signers/local.py | b3112edece1bdaa7c182b3ff9fb18a6e36a75012 | [] | no_license | ogutiann/PythonEthereumSmartContracts | 8bd81aa14eab567d41b5dad74b67aba92a405ebd | d870e9fd1c7f68b8493db4c2b2af224f966d8e51 | refs/heads/master | 2023-01-04T14:23:12.396898 | 2020-10-29T12:12:46 | 2020-10-29T12:12:46 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,845 | py | import warnings
from eth_account.signers.base import (
BaseAccount,
)
class LocalAccount(BaseAccount):
r"""
A collection of convenience methods to sign and encrypt, with an embedded private key.
:var bytes key: the 32-byte private key data
.. code-block:: python
>>> my_local_account.ad... | [
"sijoythomas@pop-os.localdomain"
] | sijoythomas@pop-os.localdomain |
e29dc15662e20df9a68545bb651642a23299991c | 07504838d12c6328da093dce3726e8ed096cecdb | /pylon/resources/datapoints/multiplier_s.py | e1f6f1673af46c99867dc958f2dc2a793e6010aa | [] | no_license | lcoppa/fiat-lux | 9caaa7f3105e692a149fdd384ec590676f06bf00 | 7c166bcc08768da67c241078b397570de159e240 | refs/heads/master | 2020-04-04T02:47:19.917668 | 2013-10-10T10:22:51 | 2013-10-10T10:22:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,282 | py | """multiplier_s standard datapoint type, originally defined in resource file
set standard 00:00:00:00:00:00:00:00-0. """
# Copyright (C) 2013 Echelon Corporation. All Rights Reserved.
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation file... | [
"lcoppa@rocketmail.com"
] | lcoppa@rocketmail.com |
b1bba65c64df29b31b76339751cbbc8806397ddc | 14567e2f77d2bf697bb18c3c1e3d6744c11f41c8 | /kfpt/old/ftp.py | dacb7eea6ca2d99b1bd4ef22df1c34b411c3282e | [] | no_license | yanislong/junnan | 268e64c288e18456da621d5485e04bf8eb8f5322 | fc35f32a29a7b6da2a8ea334d0e53a21a81d97f3 | refs/heads/master | 2021-01-01T20:08:05.825407 | 2017-09-08T02:24:40 | 2017-09-08T02:24:40 | 98,772,303 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 933 | py | #!/usr/bin/python
# -*- coding:utf-8 -*-
from ftplib import FTP
import os
ftp = FTP()
ftp.set_debuglevel(2)
ftp.connect("123.126.34.27","12221")
for i in range(1):
try:
ftp.login("TTuser7017","791241")
print "ok"
except:
print "no"
print ftp.getwelcome()
print "****************come... | [
"335916781@qq.com"
] | 335916781@qq.com |
30830b98e7dfdae390d1c5750b4945123531013a | c9b1e04ba65ba3e0af2a8ae86b88187b72bcaa0b | /.svn/pristine/30/30830b98e7dfdae390d1c5750b4945123531013a.svn-base | 434e78a9bc49b211fa0f15acea01356572d0765a | [] | no_license | feitianyiren/TaskCoach | 7762a89d5b521cfba0827323a9e8a91d1579810b | 0b7427562074845ac771e59e24a750aa5b432589 | refs/heads/master | 2020-04-08T04:56:35.491490 | 2016-01-12T13:29:03 | 2016-01-12T13:29:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,967 | import patterns, wx
from i18n import _
import domain.date as date
import task
def newTaskMenuText():
# There is a bug in wxWidget/wxPython on the Mac that causes the
# INSERT accelerator to be mapped so some other key sequence ('c' in
# this case) so that whenever that key sequence is typed, this ... | [
"hieronymus_schweiz@yahoo.de"
] | hieronymus_schweiz@yahoo.de | |
1630c7c38774560507877f3e076ad65cc552781d | 163bbb4e0920dedd5941e3edfb2d8706ba75627d | /Code/CodeRecords/2539/60757/284819.py | 3db560fcc8fdfff1cf8c9c9c7072d6a8c1b3457c | [] | no_license | AdamZhouSE/pythonHomework | a25c120b03a158d60aaa9fdc5fb203b1bb377a19 | ffc5606817a666aa6241cfab27364326f5c066ff | refs/heads/master | 2022-11-24T08:05:22.122011 | 2020-07-28T16:21:24 | 2020-07-28T16:21:24 | 259,576,640 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 309 | py | arr=eval(input())
so=sorted(arr)
if arr==so:
print(0)
else:
start=0
end=len(arr)
for i in range(len(arr)):
if arr[i]!=so[i]:
start=i
break
for i in range(len(arr)-1,-1,-1):
if arr[i]!=so[i]:
end=i
break
print(end-start+1) | [
"1069583789@qq.com"
] | 1069583789@qq.com |
a0b37fce115cdddf856c63213f99260b151e182f | f2e38023f424ea53e270fd93e41e5ec1c8cdb2cf | /infra/bots/gen_compile_isolate.py | ea55908bea0858d98775a084ec6753f1588e93e2 | [
"BSD-3-Clause"
] | permissive | skui-org/skia | 3dc425dba0142390b13dcd91d2a877c604436e1c | 1698b32e63ddc8a06343e1a2f03c2916a08f519e | refs/heads/m85 | 2021-01-22T21:02:53.355312 | 2020-08-16T10:53:34 | 2020-08-16T13:53:35 | 85,350,036 | 23 | 11 | BSD-3-Clause | 2020-09-03T09:23:38 | 2017-03-17T19:59:37 | C++ | UTF-8 | Python | false | false | 6,792 | py | #!/usr/bin/env python
#
# Copyright 2019 Google LLC
#
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import difflib
import os
import re
import subprocess
import sys
# Any files in Git which match these patterns will be included, either directly
# or indirectly ... | [
"skia-commit-bot@chromium.org"
] | skia-commit-bot@chromium.org |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.