blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 3 616 | 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 777
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 149
values | src_encoding stringclasses 26
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 3 10.2M | extension stringclasses 188
values | content stringlengths 3 10.2M | authors listlengths 1 1 | author_id stringlengths 1 132 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
34cc1bf223f7f56c695b00d0565cca6f6dc989a5 | 8ee8fe3c2acea497a85428bfb3dfde19e58b2bc3 | /test-examples/nD_mixed.py | 83eb382991ac4b297956c5f27d493014c7047df8 | [
"BSD-3-Clause"
] | permissive | sofroniewn/image-demos | a6e46f08fd4ce621aa96d6b6378b50f63ac2b381 | 2eeeb23f34a47798ae7be0987182724ee3799eb8 | refs/heads/master | 2022-11-02T23:50:23.098830 | 2022-10-30T04:38:19 | 2022-10-30T04:38:19 | 179,378,745 | 11 | 1 | null | null | null | null | UTF-8 | Python | false | false | 516 | py | """
Slide through 3D Volume series in 4D data using the add_volume API
"""
from skimage import data
import numpy as np
import napari
with napari.gui_qt():
blobs = np.asarray(
[
data.binary_blobs(length=64, volume_fraction=0.1, n_dim=3).astype(
float
)
f... | [
"sofroniewn@gmail.com"
] | sofroniewn@gmail.com |
db2d32e8cc23e04e50efca093c02779c6dae5ac3 | 2ee5578fb824633d7d8f3500726bf2935caff977 | /Windows_Python_packages_for_KLayout/python/shapely/tests/test_creation.py | 88a54c72f1eb04c3886ba39926aa98e46cbed6f0 | [
"MIT"
] | permissive | SiEPIC/SiEPIC-Tools | d214a10e213bc8265eb0b0ab979d1f7a232cdccc | ec841c1c22b8c59982d8759e073fbc54fbdc8c54 | refs/heads/master | 2023-05-23T11:03:13.516258 | 2023-05-15T19:04:55 | 2023-05-15T19:04:55 | 113,897,603 | 103 | 59 | NOASSERTION | 2023-09-13T23:10:11 | 2017-12-11T19:10:13 | Python | UTF-8 | Python | false | false | 16,408 | py | import numpy as np
import pytest
import shapely
# Note: Point is not imported because it is overridden for testing
from shapely import (
GeometryCollection,
GeometryType,
LinearRing,
LineString,
MultiLineString,
MultiPoint,
MultiPolygon,
Polygon,
)
from shapely.testing import assert_ge... | [
"lukasc@ece.ubc.ca"
] | lukasc@ece.ubc.ca |
fc5bba0bfd961caa2e101550321cb8be6eff8fab | 5897e3072b9f5c80c7640504cd893c0b18148ebe | /obj_sql/expressions/__init__.py | 09ef5f5b9bae47f425d809c9b322ef7e0222647f | [] | no_license | nttlong/python-libs | bc12446698b32aceaaf979aa5a95400fb2120e51 | 32e8dd67cd88a12ec808ec3cd178b3fa5a8928c1 | refs/heads/main | 2023-01-12T15:07:11.411690 | 2020-11-21T06:23:16 | 2020-11-21T06:23:16 | 309,013,562 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 113 | py | from .fields import field
from .fields_expression import field_expression
from .fields_member import field_member | [
"zugeliang2000@gmail.com"
] | zugeliang2000@gmail.com |
2ef8ad9520e99842ad0aba6bd17b8b532e925ffa | 3cffa92ed70f487a3ea28b73a8f544bbc347e450 | /tests/test_oli.py | 8978a3db7caebc6920c1007df2d339b04994b0e4 | [] | no_license | vahtras/dalmisc | 63962ca86d00c59ea019db2b0e5eebba488f70b5 | 2e344132eaac0d163cdb41a5737baca8e875fc49 | refs/heads/master | 2023-01-31T06:42:38.964477 | 2020-12-15T10:38:29 | 2020-12-15T10:38:29 | 321,618,346 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 588 | py | import os
from util.full import unit, init, matrix
from dalmisc import oli
from .common_tests import assert_
def setup():
global suppdir
n, e = os.path.splitext(__file__)
suppdir = n + ".d"
def test_e2n_S():
refe2 = init([
[0.78643356, -0.50624296],
[-0.50624296, 0.78643356]
])... | [
"vahtras@kth.se"
] | vahtras@kth.se |
f54b6de297ca25b541adb6bd4b12906d8bc8fcfd | 077c91b9d5cb1a6a724da47067483c622ce64be6 | /fuzz_pyretic_mesh_proactive_firewall_no_close_check_loop_mcs_with_max_replays_5/interreplay_135_r_4/interactive_replay_config.py | ce9454be78e968ff18bc201ae28a9357ab12050d | [] | no_license | Spencerx/experiments | 0edd16398725f6fd9365ddbb1b773942e4878369 | aaa98b0f67b0d0c0c826b8a1565916bf97ae3179 | refs/heads/master | 2020-04-03T10:11:40.671606 | 2014-06-11T23:55:11 | 2014-06-11T23:55:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,029 | py |
from config.experiment_config_lib import ControllerConfig
from sts.topology import *
from sts.control_flow import InteractiveReplayer
from sts.simulation_state import SimulationConfig
from sts.input_traces.input_logger import InputLogger
simulation_config = SimulationConfig(controller_configs=[ControllerConfig(start_... | [
"cs@cs.berkeley.edu"
] | cs@cs.berkeley.edu |
f6a0fef8c7c0962752e3f0be0a812c8744fff280 | efd8628adc042ae2d58fa89cc31a5c1c80aa94f6 | /bi_conv_lstm/src/convlstm_cell.py | 2fce2759c2fffbd8344d862bd762e4273427b43e | [] | no_license | Xharlie/stochast_dynamic_for_video_infilling | d7e0bfaf8b71cf3f39170793e5a1a50b289aee40 | a825de4c5178f7084925817f0631ac331073866f | refs/heads/master | 2021-03-27T09:11:15.478067 | 2019-10-23T17:59:25 | 2019-10-23T17:59:25 | 110,137,739 | 6 | 1 | null | null | null | null | UTF-8 | Python | false | false | 4,946 | py | import tensorflow as tf
class ConvLSTMCell(tf.nn.rnn_cell.RNNCell):
"""A LSTM cell with convolutions instead of multiplications.
Reference:
Xingjian, S. H. I., et al. "Convolutional LSTM network: A machine learning approach for precipitation nowcasting." Advances in Neural Information Processing Systems. 2015.... | [
"charlie.xu007@yahoo.com"
] | charlie.xu007@yahoo.com |
82ab7c61bcd07b03c93eb2c5495b8867ec737671 | 9b3e46ef2ffd65cccace3e3e3d93438c077e4f9e | /main/dialog/template.py | 12e827125435f1610370d68c18651b38ebcd624b | [
"BSD-2-Clause"
] | permissive | wizadr/cports | 1dd043045fc63b061f803d1992a9ccdc995850ad | be5f4695305d9c00de9d4e252e67db8081690c3e | refs/heads/master | 2023-08-21T11:35:16.710064 | 2021-10-25T00:38:04 | 2021-10-25T00:38:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 641 | py | pkgname = "dialog"
_mver = "1.3"
_date = "20210621"
pkgver = f"{_mver}.{_date}"
pkgrel = 0
build_style = "gnu_configure"
configure_args = ["--with-ncursesw", "--disable-nls"]
makedepends = ["ncurses-devel"]
pkgdesc = "Tool to display dialog boxes from shell scripts"
maintainer = "q66 <q66@chimera-linux.org>"
license = ... | [
"q66@chimera-linux.org"
] | q66@chimera-linux.org |
d039d23102a35433edadb4a67f3a22b65f11d99c | 36901e58fbdeabc7380ae2c0278010b2c51fe54d | /gatheros_event/helpers/event_business.py | 55a6a5bce19c24a740033883ffbe597b2be365cc | [] | no_license | hugoseabra/congressy | e7c43408cea86ce56e3138d8ee9231d838228959 | ac1e9b941f1fac8b7a13dee8a41982716095d3db | refs/heads/master | 2023-07-07T04:44:26.424590 | 2021-08-11T15:47:02 | 2021-08-11T15:47:02 | 395,027,819 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,384 | py | """
Esses helpers tem como objetivo identificar o tipo do evento:
- Grátis
- Pago
Além de também mudar o tipo do evento e aplicar as configuração das features
disponiveis de acordo com o tipo em si
"""
from gatheros_event.event_state import EventState, EventPayable
from gatheros_event.mo... | [
"nathan.eua@gmail.com"
] | nathan.eua@gmail.com |
fef0aa9b88d267ea1543943ccc5df703e7c1d7d2 | 45c7693fabf2bf6aa142ea08ed7ec45b9a6aee79 | /apps/belt_app/views.py | 576b7dfeec8067fb6ad1415728705a1827018ea8 | [] | no_license | stuffyUdaya/quote | 95cedd352b493eb29f127cc9be78456652e1cca8 | ae979eeb92b490fa12ee95d4276bef9517286c5a | refs/heads/master | 2021-01-09T06:11:50.343620 | 2017-02-04T14:43:09 | 2017-02-04T14:43:09 | 80,923,789 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,662 | py | from django.shortcuts import render,redirect
from django.urls import reverse
from django.contrib import messages
from .models import User,Quote,Fav
from django.db.models import Count
def index(request):
return render (request, 'belt_app/index.html')
def process(request):
results = User.objects.userValidator(... | [
"udayatummala1@gmail.com"
] | udayatummala1@gmail.com |
31d4b7d24d52dd5c170a20732ea593848cb6621e | 6a95112805b64322953429270a305d01fef3faea | /dist/weewx-3.9.2/bin/weewx/wxservices.py | eb777b1882ae3211879a2917cb29e3b810305037 | [
"GPL-3.0-only",
"GPL-1.0-or-later",
"Apache-2.0"
] | permissive | tomdotorg/docker-weewx | c6d59dc492a9e53f3bc898f7b9f593717092d72c | 7085654f455d39b06acc688738fde27e1f78ad1e | refs/heads/main | 2023-06-08T17:57:44.184399 | 2023-01-30T11:21:23 | 2023-01-30T11:21:23 | 54,113,384 | 21 | 16 | Apache-2.0 | 2022-10-19T23:46:26 | 2016-03-17T11:39:29 | Dockerfile | UTF-8 | Python | false | false | 19,145 | py | #
# Copyright (c) 2009-2016 Tom Keffer <tkeffer@gmail.com>
#
# See the file LICENSE.txt for your full rights.
#
"""Services specific to weather."""
import syslog
import weedb
import weewx.units
import weewx.engine
import weewx.wxformulas
import weeutil.weeutil
from weewx.units import CtoF, mps_to_mph, kph_to_... | [
"tom@tom.org"
] | tom@tom.org |
481fed185285ec1d94f5bd7aa0a787c7faf5be00 | 269feb0a04e10df899b7cf0d37c42fd295fd6ac0 | /41列表排序.py | ee790c8a910030c4a5391fcb591cdb27080b8f1e | [] | no_license | zhangxingxing12138/card | c0134951ded50b7cb8c129c28e07252f35796052 | 793de5c5546143b59f8fd169a4e0c2cea1a5b416 | refs/heads/master | 2020-03-23T11:45:29.070458 | 2018-10-16T00:15:01 | 2018-10-16T00:15:01 | 141,519,799 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 56 | py | num_list=[2,5,3,8,10,1]
num_list.sort()
print(num_list)
| [
"you@example.com"
] | you@example.com |
b10b197f934cdecd38564cb304870ecf73768943 | e5329001263e67a4d3c13d57bb91f2502280e206 | /InvTL/lm_py/pypy/jit/metainterp/test/test_ztranslation.py | d5db7f3d2c2fc1f5deaf59451266e18775a8ea35 | [] | no_license | yanhongliu/DARLAB | d9432db6e005a39e33501d7ffffe6e648b95b3fc | f739318c9620b44ef03d155f791c7ed4111d80fa | refs/heads/master | 2021-05-27T19:58:58.458846 | 2014-02-04T12:09:26 | 2014-02-04T12:09:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,277 | py | import py
from pypy.jit.metainterp.warmspot import rpython_ll_meta_interp, ll_meta_interp
from pypy.jit.backend.llgraph import runner
from pypy.rlib.jit import JitDriver, OPTIMIZER_FULL, unroll_parameters
from pypy.rlib.jit import PARAMETERS, dont_look_inside
from pypy.jit.metainterp.jitprof import Profiler
from pypy.r... | [
"mickg10@gmail.com"
] | mickg10@gmail.com |
a5b0332978d11b16182826ca5685a1f52e032ea8 | afd9c9dd58d0e91b84aab77d24ccf36d8b020f94 | /obonet/io.py | e43afb702a0fc788224648937aaebdb130624ff5 | [
"BSD-2-Clause-Patent"
] | permissive | dhimmel/obonet | 11d8c3b30e77e5910d60733711f28cd756f47d9c | fec6a82e53d01338c85e77039a4dc05288f6ab99 | refs/heads/main | 2023-03-04T00:29:18.215986 | 2023-02-28T17:17:57 | 2023-02-28T17:17:57 | 35,751,761 | 115 | 25 | NOASSERTION | 2022-11-10T11:22:07 | 2015-05-17T04:23:23 | Python | UTF-8 | Python | false | false | 2,137 | py | from __future__ import annotations
import importlib
import io
import logging
import mimetypes
import os
import re
from typing import Callable, TextIO, Union
from urllib.request import urlopen
PathType = Union[str, os.PathLike, TextIO]
def open_read_file(path: PathType, encoding: str | None = None) -> TextIO:
""... | [
"daniel.himmelstein@gmail.com"
] | daniel.himmelstein@gmail.com |
5b7b72098bba09b1082880311e8f3fdb84f678c9 | 5864e86954a221d52d4fa83a607c71bacf201c5a | /eve/client/script/entities/ActionObjectClient.py | 6e27794a321733b47fbd58e3b427686d66348c3b | [] | no_license | connoryang/1v1dec | e9a2303a01e5a26bf14159112b112be81a6560fd | 404f2cebf13b311e754d45206008918881496370 | refs/heads/master | 2021-05-04T02:34:59.627529 | 2016-10-19T08:56:26 | 2016-10-19T08:56:26 | 71,334,417 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 999 | py | #Embedded file name: e:\jenkins\workspace\client_SERENITY\branches\release\SERENITY\eve\client\script\entities\ActionObjectClient.py
import svc
import localization
class EveActionObjectClientSvc(svc.actionObjectClientSvc):
__guid__ = 'svc.eveActionObjectClientSvc'
__replaceservice__ = 'actionObjectClientSvc'
... | [
"le02005@163.com"
] | le02005@163.com |
7a177033a21ab52312bd03811c74b9fa2fc6488c | 04164e028417ff8472b9f2bfec0ec45b0888f743 | /development/utilities/qh-interpolate | 23660381db250d30447b73d6e97d1e567b0a7eff | [] | no_license | Huaguiyuan/quantum-honeycomp | c2b810ff5f5e25d41b1f0c1c1ff7ae500b04dc31 | 50deb0e59fffe4031f05094572552ca5be59e741 | refs/heads/master | 2020-03-22T19:09:58.148862 | 2018-07-08T19:51:58 | 2018-07-08T19:51:58 | 140,510,217 | 1 | 2 | null | 2018-07-11T02:20:32 | 2018-07-11T02:20:32 | null | UTF-8 | Python | false | false | 1,527 | #!/usr/bin/python
import numpy as np
import numpy
def write_interpolation(centers=[[0.,0.,0.]], heights=[10.0],name=""):
""" Creates a set of lorentzian at that position and with a height"""
if len(heights)<len(centers):
heights = [10. for i in centers]
fac = 5.0 # factor to mix the gaussians
... | [
"jose.luis.lado@gmail.com"
] | jose.luis.lado@gmail.com | |
9dc965a73917db5c9bc735c53cda18a3e9a59059 | fb98f1e69cb6e14d804c916c4d4ab45acb4f7215 | /setup.py | 5e81d07c8ab9ac906e6ad46326bb23fed7fc220a | [
"Apache-2.0"
] | permissive | q759729997/qytPython | 6c8f65b954e43ea2a75a1fd1286b7c2e896ba9f2 | f468ef0a4495eb7ce58cb052e0370a8f22bca008 | refs/heads/master | 2020-12-05T13:57:43.794982 | 2020-03-29T15:00:27 | 2020-03-29T15:00:27 | 232,131,640 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,049 | py | #!/usr/bin/env python
# coding=utf-8
import os
from setuptools import setup, find_packages
__version__ = None
with open("qytPython/version.py") as f:
exec(f.read())
with open('README.md', encoding='utf-8') as f:
readme = f.read()
with open('LICENSE', encoding='utf-8') as f:
license = f.read(... | [
"qiaoyongtian@qq.com"
] | qiaoyongtian@qq.com |
ab2d4503b34fd674906127afc68cf789f6a4702b | f27f3dc88ea4b777063aa449d882663606e45990 | /pySDC/implementations/collocation_classes/equidistant_spline_right.py | 737e1a3071509125ce1512f83ab8bba7c8498ec7 | [
"BSD-2-Clause"
] | permissive | DmytroSytnyk/pySDC | 81a0a6ff86572d687338c7b0c9d2a274e78cb6ef | 9c7c41ac00411cdc58dfa30be794c3bb77a58293 | refs/heads/master | 2020-04-16T13:58:44.021412 | 2018-11-19T07:55:42 | 2018-11-19T07:55:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,164 | py | from __future__ import division
import numpy as np
import scipy.interpolate as intpl
from pySDC.core.Collocation import CollBase
from pySDC.core.Errors import CollocationError
class EquidistantSpline_Right(CollBase):
"""
Implements equidistant nodes with right end point included and spline interpolation
... | [
"r.speck@fz-juelich.de"
] | r.speck@fz-juelich.de |
b15b1831c7bab23eae614a8ac41760cd3b32dee6 | 214d0b18e3bed9ae2ba33e9a3d9d2b447c13dd2e | /k_fold_cross_validation.py | cd1ff51f751ee9b217b204fc08df53afb3dec931 | [] | no_license | janFrancoo/Machine-Learning-Tutorials | 3cc1d47939fac44630b475ce5bd5dc52f84bde1e | 56dab9722606dc27df2f613bfbd277f27122eb88 | refs/heads/master | 2020-06-17T14:16:06.423200 | 2019-08-03T11:44:47 | 2019-08-03T11:44:47 | 195,948,343 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 701 | py | from sklearn.datasets import load_iris
from sklearn.neighbors import KNeighborsClassifier
from sklearn.metrics import accuracy_score, confusion_matrix
from sklearn.model_selection import train_test_split, cross_val_score
df = load_iris()
x = df.data
y = df.target
x_train, x_test, y_train, y_test = train_test_split(x,... | [
"noreply@github.com"
] | janFrancoo.noreply@github.com |
cc5cf5398f77652abe718d6ae45d9eb527566a58 | f7772d2d686811610763aa177cc37a1ae4e0cb95 | /cosmosis/cosmosis/samplers/star/star_sampler.py | 5a497f019d6d5948cb292f3a5944d94223152aaa | [
"BSD-2-Clause"
] | permissive | joezuntz/summer-school-1 | 51d5cfb9e62a99e33bc1fd89b8ced2aa96440c63 | 0575e0d7cab34a616e107967147c9cc97f0953a6 | refs/heads/master | 2021-05-21T17:56:44.732129 | 2020-04-03T13:40:38 | 2020-04-03T13:40:38 | 252,744,071 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,535 | py | from __future__ import print_function
from builtins import zip
from builtins import map
from builtins import str
import itertools
import numpy as np
from .. import ParallelSampler
def task(p):
i,p = p
results = star_sampler.pipeline.run_results(p)
#If requested, save the data to file
if star_sampler.... | [
"joezuntz@googlemail.com"
] | joezuntz@googlemail.com |
90666c5cc6eff1cf432eac73b42bd2a8ba4eba13 | b9adf873bc36f8e1244d889cedeee22ad9a3cb6b | /PythonForArcGIS/SF_PFA2/ch10/script/bufferLoopRange.py | 88a69b10d0421228a1d531d3d0412cb609489a48 | [] | no_license | forgetbear/B_PYTHON_GIS | e2860b1dfdf1e714ffef0fad90949c083b1d4ab4 | a92cdb97f601a4c61c399ad75c5f839983fab956 | refs/heads/master | 2023-06-08T03:18:03.786982 | 2023-05-28T16:42:37 | 2023-05-28T16:42:37 | 104,445,746 | 0 | 0 | null | 2017-09-22T07:34:40 | 2017-09-22T07:34:40 | null | UTF-8 | Python | false | false | 595 | py | # bufferLoopRange.py
# Purpose: Buffer a park varying buffer distances from 1 to 5 miles.
import arcpy
arcpy.env.workspace = 'C:/gispy/data/ch10'
outDir = 'C:/gispy/scratch/'
arcpy.env.overwriteOutput = True
inName = 'park.shp'
for num in range(1, 6):
# Set the buffer distance based on num ('1 miles', '2 miles', .... | [
"aaronhsu219@gmail.com"
] | aaronhsu219@gmail.com |
5c18aa542642be81a4a39dd0d778ab66114f13fa | cc13092b652113221a877db2bf907c050dc30aaa | /meta_reward_learning/textworld/lib/graph_search.py | 71904064535272cd066fb4381f410246e4c7b088 | [
"MIT",
"Apache-2.0"
] | permissive | Th-Fo/google-research | 1e62ee50f76c2931fdb6db1de736a85e94251e25 | 9d7bd968843c27216d01c92ff832b1cd58cafa85 | refs/heads/master | 2020-12-27T17:30:43.916109 | 2020-05-25T17:06:20 | 2020-05-25T17:06:20 | 237,989,659 | 1 | 3 | Apache-2.0 | 2020-05-25T17:06:22 | 2020-02-03T14:52:08 | null | UTF-8 | Python | false | false | 2,199 | py | # coding=utf-8
# Copyright 2020 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 |
69245191cd77a6704b51bcdadfef4132821d8865 | 24d8cf871b092b2d60fc85d5320e1bc761a7cbe2 | /eXe/rev2283-2409/base-trunk-2283/exe/engine/idevice.py | bfd60b87586091ea323f16d24950704388984cf6 | [] | no_license | joliebig/featurehouse_fstmerge_examples | af1b963537839d13e834f829cf51f8ad5e6ffe76 | 1a99c1788f0eb9f1e5d8c2ced3892d00cd9449ad | refs/heads/master | 2016-09-05T10:24:50.974902 | 2013-03-28T16:28:47 | 2013-03-28T16:28:47 | 9,080,611 | 3 | 2 | null | null | null | null | UTF-8 | Python | false | false | 5,006 | py | """
The base class for all iDevices
"""
import copy
import logging
from exe.engine.persist import Persistable
from exe.engine.translate import lateTranslate
log = logging.getLogger(__name__)
class Idevice(Persistable):
"""
The base class for all iDevices
iDevices are mini templates which the user uses to cr... | [
"joliebig@fim.uni-passau.de"
] | joliebig@fim.uni-passau.de |
915dabab5c458624fe039b5c88de3417309b62b0 | 779bf1355be59dc85a231d7d8fe822d0fca78c9f | /coords.py | 046bee245816be8db92b594b2c0d343b263de4e8 | [
"MIT"
] | permissive | euribates/Jupyter-Intro | a37ee963e56b0335fcd58f1897ee698b2fca6368 | a199655436cc4ccd41ec22398a1c5212c541f24b | refs/heads/master | 2018-10-01T02:42:55.713920 | 2018-06-20T15:02:49 | 2018-06-20T15:02:49 | 81,320,064 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,678 | py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
import random
import math
import pygame
pygame.init()
size = width, height = 640, 480
center = offset_x, offset_y = width // 2, height // 2
zoom = 20
screen = pygame.display.set_mode(size)
# Colores
black = (0, 0 , 0)
white = (255, 255, 255)
red = (255, ... | [
"euribates@gmail.com"
] | euribates@gmail.com |
73685887968e64473520eebdf7559eab94a3c3aa | 0760fb4901a75766921a205b55686d6d6f049b30 | /rllib/core/models/tf/heads.py | 9e3a413131d0a1fe71e908ba068b781744d1648d | [
"MIT",
"BSD-3-Clause",
"Apache-2.0"
] | permissive | ray-project/ray | a4bb6940b08b59a61ef0b8e755a52d8563a2f867 | edba68c3e7cf255d1d6479329f305adb7fa4c3ed | refs/heads/master | 2023-08-31T03:36:48.164405 | 2023-08-31T03:20:38 | 2023-08-31T03:20:38 | 71,932,349 | 29,482 | 5,669 | Apache-2.0 | 2023-09-14T21:48:14 | 2016-10-25T19:38:30 | Python | UTF-8 | Python | false | false | 9,095 | py | import functools
from typing import Optional
import numpy as np
from ray.rllib.core.models.base import Model
from ray.rllib.core.models.configs import (
CNNTransposeHeadConfig,
FreeLogStdMLPHeadConfig,
MLPHeadConfig,
)
from ray.rllib.core.models.specs.checker import SpecCheckingError
from ray.rllib.core.m... | [
"noreply@github.com"
] | ray-project.noreply@github.com |
55e9f2f4de361a1f709ffdf0a753ec52d4d177e2 | 2581fbdc72887143376a8f9d8f0da0f1508b9cdf | /Flask/06-Larger-Flask-Applications/01-Using-Blueprints/myproject/owners/forms.py | a398f9af17e4d3efc9a0b241ea479d29218f4db5 | [
"Apache-2.0"
] | permissive | Sandy1811/python-for-all | 6e8a554a336b6244af127c7bcd51d36018b047d9 | fdb6878d93502773ba8da809c2de1b33c96fb9a0 | refs/heads/master | 2022-05-16T02:36:47.676560 | 2019-08-16T08:35:42 | 2019-08-16T08:35:42 | 198,479,841 | 1 | 0 | Apache-2.0 | 2022-03-11T23:56:32 | 2019-07-23T17:39:38 | Jupyter Notebook | UTF-8 | Python | false | false | 241 | py | from flask_wtf import FlaskForm
from wtforms import StringField, IntegerField, SubmitField
class AddForm(FlaskForm):
name = StringField('Name of Owner:')
pup_id = IntegerField("Id of Puppy: ")
submit = SubmitField('Add Owner')
| [
"sndp1811@gmail.com"
] | sndp1811@gmail.com |
5fb26953854ce78b6558fe662ba2e222f16ae8ce | 99cf54dd53c956c12d27c15fc15b206c70a462cf | /ch05/5-4-continue.py | 29da73ff9e7640d03ce16ab64176b2b3ebd5660f | [] | no_license | 404232077/python-course | b5707735fd899af5be07b5c643f0188db54a2ae3 | 6845010db7aa8414138b0cfd8101745532c6c01e | refs/heads/master | 2020-06-15T16:54:17.367489 | 2019-07-05T06:40:14 | 2019-07-05T06:40:14 | 195,346,608 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 141 | py | for i in range(1,6):
if i == 3:
continue
print(i)
i = 0
while (i<5):
i += 1
if i == 3:
continue
print(i) | [
"40423207@gm.nfu.edu.tw"
] | 40423207@gm.nfu.edu.tw |
75786aef013e828db98c42bcabea6ce32f0e6106 | cbc27ca33656dc85d462b2e7dc515fb991b7eda4 | /app/colors.py | 04a4108cff5f335df2c2112a2731227d9952c16d | [] | no_license | AlexandreMarcotte/PolyCortex_Gui | d82ea86bb1c068005835ad305c7e4fdaaca89405 | c3e70783daea793988ea8bd3b0a58f87fc50ec8f | refs/heads/master | 2022-10-26T06:31:59.343475 | 2019-05-17T16:31:57 | 2019-05-17T16:31:57 | 141,066,152 | 3 | 0 | null | 2021-03-25T22:40:29 | 2018-07-15T23:43:34 | Python | UTF-8 | Python | false | false | 1,865 | py | # Colors used for the regions in the signal where event occur
red = (255, 0, 0, 10)
p300_red = (255, 0, 0, 255)
pale_red = (255, 0, 0, 35)
green = (0, 255, 0, 45)
p300_green = (0, 255, 0, 255)
p300_white = (255, 255, 255, 255)
blue = (0, 0, 255, 10)
yellow = (255, 255, 0, 45)
purple = (146, 56, 219, 45)
dark_grey = (3,... | [
"alexandre.marcotte.1094@gmail.com"
] | alexandre.marcotte.1094@gmail.com |
ae5550ca8397473eab8016c7442730089e83b4c7 | 65dce36be9eb2078def7434455bdb41e4fc37394 | /66 Plus One.py | 6576b5adcd01a259a42b93a3c4bea3c281e1c33e | [] | no_license | EvianTan/Lintcode-Leetcode | 9cf2d2f6a85c0a494382b9c347bcdb4ee0b5d21a | d12dd31e98c2bf24acc20c5634adfa950e68bd97 | refs/heads/master | 2021-01-22T08:13:55.758825 | 2017-10-20T21:46:23 | 2017-10-20T21:46:23 | 92,607,185 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 559 | py | '''
Given a non-negative integer represented as a non-empty array of digits, plus one to the integer.
You may assume the integer do not contain any leading zero, except the number 0 itself.
The digits are stored such that the most significant digit is at the head of the list.
'''
class Solution(object):
def plu... | [
"yiyun.tan@uconn.edu"
] | yiyun.tan@uconn.edu |
30c81a894419eab115ec96db9261083590ebfc47 | dae212cb615e5eba3fe8108799a39bc09d7bddb6 | /leetcode/0114_flatten_binary_tree_to_linked_list.py | 279786e78ff2bcc7c0585f3c696750b0a152436c | [] | no_license | cs-cordero/interview-prep | a291b5ce2fb8461449e6e27a1f23e12b54223540 | c3b5b4612f3641572d2237e36aa23019c680c799 | refs/heads/master | 2022-05-23T10:39:59.817378 | 2020-04-29T12:57:12 | 2020-04-29T12:57:12 | 76,767,250 | 9 | 1 | null | null | null | null | UTF-8 | Python | false | false | 844 | py | from utils import Empty, TreeNode
class Solution:
def flatten(self, root: TreeNode) -> None:
if not root:
return
if root.right and root.left:
traverse_to_next(root.left).right = root.right
if root.left:
root.right = root.left
root.left = Non... | [
"ccordero@protonmail.com"
] | ccordero@protonmail.com |
77d28f6918656e3e80ca82ecd1f0f0d266db8677 | a6610e191090e216b0e0f23018cecc5181400a7a | /robotframework-ls/tests/robotframework_ls_tests/test_signature_help.py | 52c4d14f1ade79e59b100f9e7482619e5995ca6a | [
"Apache-2.0"
] | permissive | JohanMabille/robotframework-lsp | d7c4c00157dd7c12ab15b7125691f7052f77427c | 610f0257fdcd79b8c38107a0ecf600f60160bc1f | refs/heads/master | 2023-01-19T10:29:48.982578 | 2020-11-25T13:46:22 | 2020-11-25T13:46:22 | 296,245,093 | 0 | 0 | NOASSERTION | 2020-09-17T06:58:54 | 2020-09-17T06:58:53 | null | UTF-8 | Python | false | false | 774 | py | def test_signature_help_basic(workspace, libspec_manager, data_regression):
from robotframework_ls.impl.completion_context import CompletionContext
from robotframework_ls.impl.signature_help import signature_help
workspace.set_root("case4", libspec_manager=libspec_manager)
doc = workspace.get_doc("case... | [
"fabiofz@gmail.com"
] | fabiofz@gmail.com |
d5e085cb5ff4e318e55a21d55d80d6291f46ef1a | 5d06a33d3685a6f255194b13fd2e615e38d68850 | /opytimark/markers/boolean.py | b94c6a3c83585ca07ebb257de8df8a53c75b5e43 | [
"Apache-2.0"
] | permissive | sarikoudis/opytimark | 617a59eafaabab5e67bd4040473a99f963df7788 | cad25623f23ce4b509d59381cf7bd79e41a966b6 | refs/heads/master | 2023-07-24T04:19:55.869169 | 2021-09-03T13:09:45 | 2021-09-03T13:09:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,964 | py | """Boolean-based benchmarking functions.
"""
import itertools as it
import numpy as np
import opytimark.utils.constants as c
import opytimark.utils.decorator as d
import opytimark.utils.exception as e
from opytimark.core import Benchmark
class Knapsack(Benchmark):
"""Knapsack class implements a boolean-based v... | [
"gth.rosa@uol.com.br"
] | gth.rosa@uol.com.br |
444a1bdc1e196a8d209a09c69e8e5c15df8aa12a | c0a49527d2d6bf56c04349bda832875625451a39 | /project/apps/stats/urls.py | 6b857438a50d724df7c3f12febe3c65ead52540e | [
"MIT"
] | permissive | mbi/chin-up | 03d3dd7c74320aee3924ad587f4c78e8dcee815b | 4e55082996c53fcbf3e70157ba59c9c40d1fdbcc | refs/heads/master | 2023-08-21T23:14:26.368231 | 2014-05-20T08:05:55 | 2014-05-20T08:05:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 239 | py | from django.conf import settings
from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns(
'',
url(r'stats[/]$', 'stats.views.stats_view', name='stats'),
)
| [
"eric@ckcollab.com"
] | eric@ckcollab.com |
67a9389e19ff389ab6171256736ba1a3fed82640 | 12ded90ded46e991e2bfa328d620063ff124622f | /util/reggen/register.py | 8f08ab95d3f84c0cf4031bed759b35dea61f05c2 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause"
] | permissive | rswarbrick/opentitan | 84456da8bd357497bd812ae6db6000c6e7dcef8b | 7247d8aa62c7fa1878cf91c7bc8a1b2b8dd3fc9e | refs/heads/master | 2023-09-02T20:53:29.274251 | 2021-03-05T18:07:38 | 2021-03-10T11:26:37 | 249,710,844 | 0 | 0 | Apache-2.0 | 2021-05-27T16:11:59 | 2020-03-24T13:08:07 | SystemVerilog | UTF-8 | Python | false | false | 14,265 | py | # Copyright lowRISC contributors.
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0
from typing import Dict, List, Optional
from .access import SWAccess, HWAccess
from .field import Field
from .lib import (check_keys, check_str, check_name, check_bool,
... | [
"rswarbrick@gmail.com"
] | rswarbrick@gmail.com |
2f84b40b125e8d1ca2183e5d813edf383ecb7ec2 | de24f83a5e3768a2638ebcf13cbe717e75740168 | /moodledata/vpl_data/92/usersdata/250/37892/submittedfiles/atividade.py | d3db75de167513632efef98cec11cea616e0aa85 | [] | 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 | 169 | py | # -*- coding: utf-8 -*-
import math
n=int(input('digite um vlor:'))
i=1
contaor=0
while i<=n:
if n>0:
s=i/(n-1)
contador=0
i=i+1
print('%.5f'%s)
| [
"rafael.mota@ufca.edu.br"
] | rafael.mota@ufca.edu.br |
ac27f07c1d4dcebea6d5af25abd002e5e717a87c | eaf4408fd01ced7acbee7bd72cbae386c6249842 | /Projects/01-MidtermProject/tests/q1_14a.py | da8b80dab10b6f009f005d279943667830c30639 | [] | no_license | ucsd-ets/dsc10-wi21 | 54176ac31bf5bed75ab33bb670f7aec6358fd886 | 9ffe29f5af2cc58b58a08c82943f91a17b90fe91 | refs/heads/main | 2023-03-21T04:32:42.873980 | 2021-03-13T02:59:59 | 2021-03-13T02:59:59 | 325,040,482 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 231 | py | test = { 'name': 'q1_14a',
'points': 1,
'suites': [{'cases': [{'code': '>>> isinstance(weekday_pos_avg, float)\nTrue', 'hidden': False, 'locked': False}], 'scored': True, 'setup': '', 'teardown': '', 'type': 'doctest'}]}
| [
"yal319@ucsd.edu"
] | yal319@ucsd.edu |
d94fa9f50b45c677b965d5e716e5003ff19c3882 | c05ed32f1ef7e1eb7d73efd674e7d1fd710ad171 | /daily-coding-problems/problem231.py | 9db45bfef6c22729c0abe839d101f948f9ed752e | [] | no_license | carlhinderer/python-exercises | c8367517fdf835fa1117f96dbfee3dccc596afa6 | 4e09bbb4c4e2bd5644ed50e997db9f3c289a18f7 | refs/heads/master | 2021-06-01T16:17:00.389134 | 2021-02-09T18:21:01 | 2021-02-09T18:21:01 | 150,902,917 | 0 | 0 | null | 2021-04-20T20:33:11 | 2018-09-29T21:03:36 | Python | UTF-8 | Python | false | false | 286 | py | # Problem 231
# Easy
# Asked by IBM
#
# Given a string with repeated characters, rearrange the string so that no two
# adjacent characters are the same. If this is not possible, return None.
#
# For example, given "aaabbc", you could return "ababac". Given "aaab", return None.
# | [
"carl.hinderer4@gmail.com"
] | carl.hinderer4@gmail.com |
0e3cb13687bee190c90eda8bf825e45860f50c81 | 757705e98cc059b0ada491489660ac3bd6e49607 | /udun/balrog/updates.py | 49ddba3688bd32b4c19bca89934d0e2cbe18b651 | [] | no_license | mozilla-services/udun-bridge | 997ef4b83c0e33cab4a12ce25aef13843e279896 | c9494b89416c181c8de2771542089588e3087040 | refs/heads/master | 2021-01-10T06:11:23.530733 | 2019-03-28T14:12:08 | 2019-03-28T14:12:08 | 44,543,019 | 3 | 4 | null | 2019-03-28T14:12:10 | 2015-10-19T15:08:04 | Python | UTF-8 | Python | false | false | 801 | py | # tarek from
# https://hg.mozilla.org/build/tools/file/default/lib/python/balrog/submitter/
# version 9f4e6a2eafa1
import jsonmerge
def merge_partial_updates(base_obj, new_obj):
"""Merges 2 update objects, merging partials and replacing completes"""
schema = {
"properties": {
# Merge parti... | [
"tarek@ziade.org"
] | tarek@ziade.org |
7680615359e2adab26c0a4e6929c0f2a1f392e18 | e2de3f6fe4373f1d98b67af61dd558a813250d54 | /Algorithm/baekjoon/2312_수복원하기.py | b65b63e92206cee06f30380b4dcfbacde3b509fd | [] | no_license | Hansung-Lee/TIL | 3fd6d48427a8b24f7889116297143855d493535b | c24ebab8b631f5c1b835fdc8bd036acbebc8d187 | refs/heads/master | 2020-04-14T11:18:54.035863 | 2019-04-05T07:26:55 | 2019-04-05T07:26:55 | 163,810,436 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 272 | py | T = int(input())
for t in range(T):
N = int(input())
li = [0] * (N-1)
for i in range(len(li)):
while not N%(i+2):
N = N//(i+2)
li[i] += 1
for i in range(len(li)):
if li[i]:
print (f"{i+2} {li[i]}") | [
"ajtwlsgkst@naver.com"
] | ajtwlsgkst@naver.com |
4a5cf4b293ba338af36939e2ae54ccc79a1b1a16 | f33364172d2408304fbc5064774d8a864f7c1478 | /django_products/app/views_user.py | fee116c43f4275f85831dbcdcd6eb4f58ec3952e | [] | no_license | pytutorial/py2005E | 4506e13ef37810b7f5b20fcafbaee1467f9f6e97 | 7765a2d812def499ab2a8eb7dff3ad3cdcd7716f | refs/heads/master | 2022-12-09T23:09:26.657784 | 2020-09-11T13:38:05 | 2020-09-11T13:38:05 | 284,680,078 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,841 | py | from django.shortcuts import render, redirect
from .models import *
from .forms import OrderForm, SearchForm
from datetime import datetime
import math
def getPriceRangeValue(priceRange):
if str(priceRange) == '1': return None, 10
if str(priceRange) == '2': return 10, 20
if str(priceRange) == '3': return 20... | [
"duongthanhtungvn01@gmail.com"
] | duongthanhtungvn01@gmail.com |
6bf10ed48864690d532c2218b82c770acc6a402c | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/verbs/_subdivided.py | 4577fabad755648b5b6de69c364b017a654052bb | [
"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 | 259 | py |
from xai.brain.wordbase.verbs._subdivide import _SUBDIVIDE
#calss header
class _SUBDIVIDED(_SUBDIVIDE, ):
def __init__(self,):
_SUBDIVIDE.__init__(self)
self.name = "SUBDIVIDED"
self.specie = 'verbs'
self.basic = "subdivide"
self.jsondata = {}
| [
"xingwang1991@gmail.com"
] | xingwang1991@gmail.com |
c8033a45df8ddb48b786a6272cfb49e950150c1a | 6a8bc7da3104726f894ae360fce6a43a54b30812 | /gradio/themes/app.py | 0c4c5a5e4050d81fc1ba684175f285cfef7670db | [
"Apache-2.0"
] | permissive | gradio-app/gradio | 0b6b29bb0029ad3b8fc1b143f111b1230b29d23a | e4e7a4319924aaf51dcb18d07d0c9953d4011074 | refs/heads/main | 2023-09-01T10:56:50.822550 | 2023-09-01T00:28:01 | 2023-09-01T00:28:01 | 162,405,963 | 21,224 | 1,537 | Apache-2.0 | 2023-09-14T21:42:00 | 2018-12-19T08:24:04 | Python | UTF-8 | Python | false | false | 5,249 | py | import time
import gradio as gr
from gradio.themes.utils.theme_dropdown import create_theme_dropdown
dropdown, js = create_theme_dropdown()
with gr.Blocks(theme=gr.themes.Default()) as demo:
with gr.Row().style(equal_height=True):
with gr.Column(scale=10):
gr.Markdown(
"""
... | [
"noreply@github.com"
] | gradio-app.noreply@github.com |
c6bbd6594ae99077c6c3adcd262581a0fa470645 | ecad2803537295a24fe8274f99dfb85ead3a7191 | /debian/tmp/usr/lib/python2.7/dist-packages/nova/api/openstack/compute/ips.py | 6ad888fd720bc78a4e2aa588ff7eaa17984c7526 | [
"BSD-3-Clause",
"Apache-2.0",
"MIT"
] | permissive | bopopescu/stacklab-nova | 98400585ec3b4e3e94269dcb41578fffe7e2c8c1 | 4ab1698659b663ef222255610d1a5c042706dd65 | refs/heads/master | 2022-11-20T12:07:18.250829 | 2012-12-13T04:43:00 | 2012-12-13T04:43:00 | 282,166,345 | 0 | 0 | Apache-2.0 | 2020-07-24T08:31:57 | 2020-07-24T08:31:56 | null | UTF-8 | Python | false | false | 3,472 | py | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 OpenStack LLC.
# 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/... | [
"yuanotes@gmail.com"
] | yuanotes@gmail.com |
5cafe1b409dddcffba908a42582d4795944108ff | 74ab22a81ac24e6e13335b6873674de180b14c26 | /search/search_dictionary.py | 1a8acef12ca20267c97848bf4832af217fc04276 | [] | no_license | attiakihal/MazeSolver | e92d39c62a582b564bfb437c8dde06754407c626 | f737b3f4236884a70df0e35977704fe0d2836292 | refs/heads/master | 2022-04-22T22:30:40.153668 | 2019-12-08T00:56:42 | 2019-12-08T00:56:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 399 | py | from search.a_star_euclidean import a_star_euclidean
from search.a_star_manhattan import a_star_manhattan
from search.bidirectional_bfs import bidirectional_bfs
from search.bfs import bfs
from search.dfs import dfs
search_dictionary = {
"a_star_euclidean": a_star_euclidean,
"a_star_manhattan": a_star_manhattan... | [
"jonathan@Jonathans-MacBook-Pro.local"
] | jonathan@Jonathans-MacBook-Pro.local |
e5fae4b360e137a154ade338c6c6deca8b1e06e0 | d4157df22a19225b23e52476e00d854409b1f43c | /LogisticRegression/Regularized/CostReg.py | 3709d94c0be8f818e14101053f38ab8635f9bd3e | [] | no_license | shan18/Solutions-to-Machine-Learning-by-Andrew-Ng | fc4f3cd49b807ef9ce91586a4de027aa1520b04f | bcdd3a34da925944c5e03ebcf3b2c6998f731c87 | refs/heads/master | 2020-12-02T21:25:05.049786 | 2017-10-01T11:19:34 | 2017-10-01T11:19:34 | 96,312,993 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 432 | py | import numpy as np
from LogisticRegression.Sigmoid import sigmoid
def cost_reg(theta, X, y, learning_rate):
theta = np.matrix(theta)
X = np.matrix(X)
y = np.matrix(y)
first = np.multiply(-y, np.log(sigmoid(X * theta.T)))
second = np.multiply(1 - y, np.log(1 - sigmoid(X * theta.T)))
reg = (lea... | [
"thegeek.004@gmail.com"
] | thegeek.004@gmail.com |
2e523a5434e9acf6c16fdb2354db39bc2eda42dc | 37a3c2ae904998a10ad6ec9f3cd715cdda718b21 | /pythonforandroid/recipes/opencv/__init__.py | 7e70162ea315ee1144d82eb1fb473565ecba8c89 | [
"Python-2.0",
"MIT"
] | permissive | agilewalker/python-for-android | 311a97422545b5861baaeeb9c52ee7f53959acb8 | a2fb5ecbc09c4847adbcfd03c6b1ca62b3d09b8d | refs/heads/master | 2021-09-14T07:14:02.044913 | 2017-12-12T08:13:23 | 2018-01-04T12:54:31 | 113,962,045 | 1 | 2 | MIT | 2018-05-09T11:29:50 | 2017-12-12T08:11:25 | Python | UTF-8 | Python | false | false | 2,228 | py | import os
import sh
from pythonforandroid.toolchain import (
NDKRecipe,
Recipe,
current_directory,
info,
shprint,
)
from multiprocessing import cpu_count
class OpenCVRecipe(NDKRecipe):
version = '2.4.10.1'
url = 'https://github.com/Itseez/opencv/archive/{version}.zip'
#md5sum = '2ddfa9... | [
"frmdstryr@gmail.com"
] | frmdstryr@gmail.com |
45b1b8c35f3cf8c84f1fe49e5ff6aa9be0228989 | 6ab67facf12280fedf7cc47c61ae91da0bcf7339 | /service/yowsup/yowsup/demos/echoclient/layer.py | df0d73c7ce854b213f893a6fb7a43a51cb2d7fde | [
"MIT",
"GPL-3.0-only",
"GPL-3.0-or-later"
] | permissive | PuneethReddyHC/whatsapp-rest-webservice | 2f035a08a506431c40b9ff0f333953b855f9c461 | 822dfc46b80e7a26eb553e5a10e723dda5a9f77d | refs/heads/master | 2022-09-17T14:31:17.273339 | 2017-11-27T11:16:43 | 2017-11-27T11:16:43 | 278,612,537 | 0 | 1 | MIT | 2020-07-10T11:04:42 | 2020-07-10T11:04:41 | null | UTF-8 | Python | false | false | 1,646 | py | from yowsup.layers.interface import YowInterfaceLayer, ProtocolEntityCallback
class EchoLayer(YowInterfaceLayer):
@ProtocolEntityCallback("message")
def onMessage(self, messageProtocolEntity):
if messageProtocolEntity.getType() == 'text':
self.onTextMessage(messa... | [
"svub@x900.svub.net"
] | svub@x900.svub.net |
6d669d90ebcebb6b738d3b848a30cd772f7906d8 | 9e335834e7be81068f001d5451781d5c1530ebbf | /CorePython/chapter15/my_card.py | 9a24af345fd158da0a3259cb26a492e7278bfb39 | [] | no_license | jtr109/SelfLearning | c1dbffa5485d0cd2f444ea510da62a8e3d269dbc | cc920ed507647762b9855385be76869adac89e7c | refs/heads/master | 2020-04-06T04:11:31.143688 | 2016-07-22T02:19:39 | 2016-07-22T02:19:39 | 58,049,867 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,058 | py | # !/usr/bin/python
# -*- coding: utf-8 -*-
import re
def is_legal(data):
patt = '(\d{15,16})|(\d{4}-\d{6}-\d{5})|(\d{4}(-\d{4}){3})'
try:
for i in range(1, 4):
if re.match(patt, data).group(i):
pd = purify(data, i)
return legal_card(pd)
except Attribute... | [
"lyp_login@outlook.com"
] | lyp_login@outlook.com |
5e806261092da4fffa656e0cd15f16202f682184 | b4166044870d1c026e86c95ac41e3e3613ee424f | /python_basic/abc049_a.py | aebd7be45462ec67753e627646e1ba390c23f02a | [] | no_license | nsakki55/AtCoder | 2cbb785415a7c0b9df9953ddc3706c90a5716a03 | 03c428e8eb8f24b8560d00e2388ba75509619690 | refs/heads/master | 2020-05-31T04:33:06.400697 | 2020-01-19T13:41:41 | 2020-01-19T13:41:41 | 190,099,669 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 87 | py | c=input()
vowels=['a','e','i','o','u']
print('vowel' if c in vowels else 'consonant') | [
"n.sakki55@gmail.com"
] | n.sakki55@gmail.com |
2025deae0ef8bed10b8e9ccb11cc055a57a5ace7 | 37800583dd1731ce788a22622230386ac4a00bb5 | /propagators/ts.py | de13462bcf628bfe7f0b2af2de8fa63fb966c19b | [
"MIT"
] | permissive | mikelytaev/wave-propagation | 8bff1aadc80fd4fc180f50ebfc2f4b153032b3df | 5fa470234a3a3f22980a99747ecbdf5ac259451c | refs/heads/master | 2023-09-01T10:54:57.742771 | 2023-08-30T17:02:39 | 2023-08-30T17:02:39 | 95,381,841 | 21 | 6 | null | 2018-03-12T19:09:58 | 2017-06-25T19:42:53 | Python | UTF-8 | Python | false | false | 13,916 | py | from dataclasses import dataclass
import logging
import types
from enum import Enum
from copy import deepcopy
import numpy as np
import scipy.linalg as sla
import cmath as cm
from transforms.frft import *
from transforms.fcc_fourier.fcc import *
from transforms.filon import *
class ThinBody2d:
def __init__(sel... | [
"mikelytaev@gmail.com"
] | mikelytaev@gmail.com |
5c28d0b822397cf4e9ac5940634bfe9334e9babc | f2cc45e46a55c09570574eeaf358919491b4fae9 | /作业/7石头剪刀布.py | e48814caaf4f0f0203e12107fa0f806dc29be394 | [] | no_license | 2099454967/python_wang | f4f5e10891ed9be6112f8f3d0d6313975e2f914f | c9dd8a5f6a9864d2a3e61bad9a12cea566ebdec9 | refs/heads/master | 2020-03-11T17:43:43.288920 | 2018-04-24T05:27:53 | 2018-04-24T05:27:53 | 130,155,541 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 260 | py | #1---石头
#2---剪刀
#3---布
import random
a = random.randint(1,3)
b = int(input('请输入1---石头 2---剪刀 3---布'))
if (a==1 and b==2) or (a==2 and b==3) or (a==3 and b==1):
print('玩家赢')
elif a==b:
print('平局')
else:
print('电脑赢')
| [
"2099454967@qq.com"
] | 2099454967@qq.com |
3388e852acf0ee62545acf09ca024839f5401c63 | 67c0d7351c145d756b2a49e048500ff361f7add6 | /xpresso/ai/admin/infra/packages/ubuntu/utility/docker_distribution_package.py | 81af3bf83624d6377f690deef24079eac561889b | [] | no_license | Krishnaarunangsu/XpressoDataHandling | ba339ae85b52e30715f47406ddb74966350848aa | 0637a465088b468d6fdb6d1bb6f7b087547cec56 | refs/heads/master | 2020-06-27T19:58:43.358340 | 2019-08-29T16:59:08 | 2019-08-29T16:59:08 | 200,035,926 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,425 | py | """Abstract base class for packages object"""
__all__ = ['DockerDistributionPackage']
__author__ = 'Naveen Sinha'
import os
import shutil
from xpresso.ai.admin.infra.packages.abstract_package import AbstractPackage
from xpresso.ai.admin.infra.packages.local_shell_executor import \
LocalShellExecutor
from xpresso... | [
"arunangsutech@gmail.com"
] | arunangsutech@gmail.com |
2bfdde0bcb495db0d4fffb4b7621471a705ddae0 | de24f83a5e3768a2638ebcf13cbe717e75740168 | /moodledata/vpl_data/138/usersdata/210/47892/submittedfiles/volumeTV.py | d81c84c26ad1a6f289f01b721bd8d351fc33d0df | [] | 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 | 276 | py |
e=int(input('digite e:'))
f=int(input('digite f:'))
cont=e
for i in range(1,f+1,1):
a=int(input('digite alteração:'))
if (cont+a)<=100 and cont>=0:
cont=cont+a
elif (cont+a)>=100:
e=cont-100
cont=cont-e
| [
"rafael.mota@ufca.edu.br"
] | rafael.mota@ufca.edu.br |
d18fe269d04f86552cec9fbf8aa058fd36933eb2 | 4421cdef9d23204d392726db4e3886b8aec3072d | /Django/SDD/HEHE/migrations/0005_auto_20200913_1127.py | 058d909ce14f025e64ab9d7d4d3d2cb91ca114cb | [] | no_license | Sanketdave12/PRACTICE | f38b8eae569ee670db55610202ef6f3e60fade87 | 0f71359cf5326be73b3d9d4b1219bea4832cc194 | refs/heads/master | 2022-12-27T08:08:45.953842 | 2020-09-18T17:31:23 | 2020-09-18T17:31:23 | 296,587,205 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 391 | py | # Generated by Django 3.1.1 on 2020-09-13 05:57
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('HEHE', '0004_delete_profile'),
]
operations = [
migrations.RemoveField(
model_name='notice',
name='branch',
),
... | [
"sddave1998@gmail.com"
] | sddave1998@gmail.com |
df748b62727262acccea6b2dec74421a653c6b2d | fae5487c5e50d0f42cd4fc82011c67df17b424c0 | /generatorify.py | ced38a537b4f15b00af87cc145d7e2ebb0febbc2 | [
"MIT"
] | permissive | eric-wieser/generatorify | b970dbda12f7e3dca481b29647a685294dc370c9 | 7bd759ecf88f836ece6cdbcf7ce1074260c0c5ef | refs/heads/master | 2020-06-25T05:37:03.755586 | 2019-07-28T07:03:47 | 2019-07-28T07:03:47 | 199,217,917 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,760 | py | import queue
import threading
import collections.abc
class generator_from_callback(collections.abc.Generator):
"""
A generator wrapper for a function that invokes a callback multiple times.
Calling `send` on the generator emits a value from one callback, and returns
the next.
Note this starts a ... | [
"wieser.eric@gmail.com"
] | wieser.eric@gmail.com |
52cef1b52cab1ee988800a17d8e10bdc0f556955 | ef8a358a3f54a26610eadcac6d0ebca406fa2578 | /undermythumb/files.py | 36b90251fc9af101bfca1712b36bdec09229c64d | [
"BSD-3-Clause"
] | permissive | GunioRobot/django-undermythumb | af8f2f0ac0ec65d6d4c777eaf380510b8e81bd1b | f70be02998cbe97e452d8e0d66e8efc276e77621 | refs/heads/master | 2020-12-25T09:18:40.332593 | 2011-11-08T20:17:56 | 2011-11-08T20:18:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,632 | py | from django.db.models.fields.files import ImageFieldFile
__all__ = ['ThumbnailFieldFile', 'ImageWithThumbnailsFieldFile']
class ThumbnailSet(object):
def __init__(self, field_file):
self.file = field_file
self.field = self.file.field
self.instance = self.file.instance
self._cac... | [
"mattdennewitz@gmail.com"
] | mattdennewitz@gmail.com |
2e826a8d46d2e1211a1caa8a225498c5824b60a3 | 52a61caff0aeb434c32e5657e38762643e9f57dd | /DataStructuresAndAlgorithms/SearchAndSort/Sort/Count&CountingSort&Digital(Bitwise)Sorting/socks.py | 189a8837bd71a575381bfb18e4a7ee984d0e9355 | [] | no_license | AndrewErmakov/PythonTrainingBasics | 1480a6378d1ec59884760e2b3014ccc3d28f058f | 639e15bbfc54da762cb9e366497754cfece30691 | refs/heads/master | 2021-06-10T15:57:58.682335 | 2021-03-25T13:37:30 | 2021-03-25T13:37:30 | 153,678,760 | 0 | 0 | null | 2018-10-30T13:52:51 | 2018-10-18T19:45:47 | Python | UTF-8 | Python | false | false | 542 | py | len_table, count_socks, count_points = map(int, input().split())
def determination_thickness(length_table, number_socks, number_points):
count_list = [0] * (length_table + 1)
for _ in range(number_socks):
left_border, right_border = map(int, input().split())
for i in range(left_border, right... | [
"andrew.67@list.ru"
] | andrew.67@list.ru |
4c350d9b6720d62fa21156d31748be72346a2283 | ca3150c69ef477ea53902c51d3840195262f2903 | /ISStreamer-r-3-bucket.py | 797f6edf0693846d02d60e183933d15353f5a284 | [] | no_license | chaeplin/dash-mainnet | 66c8df6f4a6df25c53e9ba1572a39e12d9e61daf | 10891c210a3cf40f2e052ee9d2657a97a71efba6 | refs/heads/master | 2021-01-19T21:15:49.790385 | 2017-11-14T20:25:52 | 2017-11-14T20:25:52 | 82,476,146 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,549 | py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import io, os, sys
import simplejson as json
import datetime
import time
import redis
from ISStreamer.Streamer import Streamer
# bucket1 = dash121
iss_bucket_name1 = 'dash121'
iss_bucket_key1 = 'xxx'
iss_access_key1 = 'xxxx'
QUE_NAME1 = 'INITIALSTATE_PUSH' + iss... | [
"chaeplin@gmail.com"
] | chaeplin@gmail.com |
7dfe6483c3bf294fe7a02d964523db051a1eb588 | f166278e5e626c142245e4a9164ab4ed610a5cd4 | /apps/utils/requests_wrapper.py | 8d554e89487b84d6e723d8a0a51469e5668965e3 | [
"MIT"
] | permissive | wumulong/advance_django_example | 4cffd6de2eb9fdccefff7b995317a81e63b459be | 4832438a7db1065f7351a6cf4d4580ca1b6fffeb | refs/heads/master | 2021-06-24T13:34:31.873207 | 2017-09-11T15:13:40 | 2017-09-11T15:13:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,514 | py | import requests
def requests_get(protocal, host, port, url, headers={}, params={}):
reqeusts_result = {}
if port:
requests_url = '{0}://{1}:{2}{3}'.format(protocal, host, port, url)
else:
requests_url = '{0}://{1}{2}'.format(protocal, host, url)
try:
r = requests.get(requests_... | [
"lsdlab@icloud.com"
] | lsdlab@icloud.com |
320615428a22aa133469f7c75f2279ba09ba1719 | a2d36e471988e0fae32e9a9d559204ebb065ab7f | /huaweicloud-sdk-dds/huaweicloudsdkdds/v3/model/list_az2_migrate_request.py | 82455211ce51806b36c1f4d66474c9564882e62b | [
"Apache-2.0"
] | permissive | zhouxy666/huaweicloud-sdk-python-v3 | 4d878a90b8e003875fc803a61414788e5e4c2c34 | cc6f10a53205be4cb111d3ecfef8135ea804fa15 | refs/heads/master | 2023-09-02T07:41:12.605394 | 2021-11-12T03:20:11 | 2021-11-12T03:20:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,026 | py | # coding: utf-8
import re
import six
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
class ListAz2MigrateRequest:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The ... | [
"hwcloudsdk@huawei.com"
] | hwcloudsdk@huawei.com |
deb19ce4bc3e611f561d6ea04d4999f2e9b15fc3 | 6fa7f99d3d3d9b177ef01ebf9a9da4982813b7d4 | /bJxNHk7aovkx8Q776_10.py | 69e76a086c61099322e2b65ff967b675005faf40 | [] | no_license | daniel-reich/ubiquitous-fiesta | 26e80f0082f8589e51d359ce7953117a3da7d38c | 9af2700dbe59284f5697e612491499841a6c126f | refs/heads/master | 2023-04-05T06:40:37.328213 | 2021-04-06T20:17:44 | 2021-04-06T20:17:44 | 355,318,759 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 172 | py |
def gold_distribution(gold):
totals, p = [0, 0], 0
while gold:
idx = -1 if gold[-1] > gold[0] else 0
totals[p] += gold.pop(idx)
p = 1 - p
return totals
| [
"daniel.reich@danielreichs-MacBook-Pro.local"
] | daniel.reich@danielreichs-MacBook-Pro.local |
9e0aa6a22faffb9424db0cf20701f012fab75424 | 59b72b8f662cd605b3ce31f54779c17e5ca066d0 | /interview_q/leet_code/解码方法.py | 84496ba3e188f5a6b9f0ffc14b200e43e24c76c6 | [] | no_license | dongyang2/hello-world | c1f5853ccafd6b8f23836192547ab36f898e0891 | 1f859b53e2b21ed5a648da09b84950f03ec1b370 | refs/heads/master | 2022-12-11T22:07:22.853912 | 2022-11-24T03:52:35 | 2022-11-24T03:52:35 | 119,025,960 | 0 | 0 | null | 2018-01-26T10:09:58 | 2018-01-26T08:28:10 | null | UTF-8 | Python | false | false | 4,137 | py | # https://leetcode-cn.com/problems/decode-ways/
# coding:utf-8
# Python 3
# 数字与字母一一对应,求转换结果。解法参考本文件夹下的爬楼梯和电话号码的字母组合。
"""
此题和爬楼梯是同一个类型的问题,难点在于其添加了许多限制条件,只要避开限制条件就可以完美解题了
每次递进,可以选取一个数也可以选取两个数:
s[i] != '0'
如果 s[i-1]s[i] <= 26, 则 dp[i] = dp[i-1] + dp[i-2]
如果 s[i-1]s[i] > 26, 则 dp[i] = dp[i-1], 这是因为 s[i-1]s[i... | [
"dongyangzhao@outlook.com"
] | dongyangzhao@outlook.com |
3d027acd0606c60ffd743a4cc8749791bd344110 | 527d3d38b57b9f12ea6e91167a9a06149a89044b | /wxFEFactory/python/tools/base/assembly_hacktool.py | 9606e4c6a07dd554a1bb017e2c31e0fef44e904c | [] | no_license | czastack/wxFEFactory | 0d7ee77e542234c039b6056aeb44cb2a40341714 | bed824746266734e40103010c0132aad069d723a | refs/heads/master | 2021-06-04T11:31:05.808038 | 2019-06-03T18:51:01 | 2019-06-03T18:51:01 | 97,013,565 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 12,752 | py | import types
from functools import partial
from lib.extypes import DataClass
from lib.hack import utils
from fefactory_api import ui
from .hacktool import BaseHackTool
from .assembly_code import AssemblyGroup
class AssemblyHacktool(BaseHackTool):
"""现在支持x86 jmp"""
allocated_memory = None
def... | [
"2464851375@qq.com"
] | 2464851375@qq.com |
75db6db8e3ec02e93aea1287da42f3a1327f4b24 | 4b7e282fe480415f5d52c0fc0429f144156190fe | /google/ads/googleads/v8/services/services/campaign_service/transports/grpc.py | 9067b4cccf09e89fdf60722cc9f8c8a41a92aaff | [
"Apache-2.0"
] | permissive | Z2Xsoft/google-ads-python | c4750357bb19da91bb3b6bf2fa84bef9d2df36d3 | 1779d52a0446c8afb2437b0a9e103dcb849f5590 | refs/heads/main | 2023-08-18T15:22:17.840364 | 2021-09-26T04:08:53 | 2021-09-26T04:08:53 | 410,444,398 | 0 | 0 | Apache-2.0 | 2021-09-26T04:08:53 | 2021-09-26T03:55:38 | null | UTF-8 | Python | false | false | 12,386 | py | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | [
"noreply@github.com"
] | Z2Xsoft.noreply@github.com |
73a708a16278b09791fad51bf5d305698e82b80d | 9e988c0dfbea15cd23a3de860cb0c88c3dcdbd97 | /sdBs/AllRun/pg_2352+180/sdB_PG_2352+180_coadd.py | 4f361c9b0b46950c02cba15a5912a175c25af4eb | [] | no_license | tboudreaux/SummerSTScICode | 73b2e5839b10c0bf733808f4316d34be91c5a3bd | 4dd1ffbb09e0a599257d21872f9d62b5420028b0 | refs/heads/master | 2021-01-20T18:07:44.723496 | 2016-08-08T16:49:53 | 2016-08-08T16:49:53 | 65,221,159 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 430 | py | from gPhoton.gMap import gMap
def main():
gMap(band="NUV", skypos=[358.821833,18.337653], skyrange=[0.0333333333333,0.0333333333333], stepsz = 30., cntfile="/data2/fleming/GPHOTON_OUTPUT/LIGHTCURVES/sdBs/sdB_PG_2352+180/sdB_PG_2352+180_movie_count.fits", cntcoaddfile="/data2/fleming/GPHOTON_OUTPUT/LIGHTCURVES/sdB/sdB... | [
"thomas@boudreauxmail.com"
] | thomas@boudreauxmail.com |
e391925b4696862a60c04799026bcb83b93c85ed | 6e507e231d37d0b61d70d6694ffc928c1c638973 | /lab07password_generator.py | e140d562109bb3555972e6c8641cf57aee410451 | [] | no_license | pjz987/pdx_code_intro_class | 7a4998be23b90883aad55664ceb97baffe3fcf92 | e85c2e01718e75124b956b924af01e87cdd95ee1 | refs/heads/master | 2020-09-12T21:25:50.152682 | 2019-11-18T23:10:38 | 2019-11-18T23:10:38 | 222,561,726 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,271 | py | '''
filename : lab07password_generator.py
Lab 7: Password Generator
Let's generate a password ten characters long using a loop (while loop or for loop) and random.choice, this will be a string of random characters.
'''
#always import random first if needed
import random
#using import string to quickly call up alphab... | [
"pwj2012@gmail.com"
] | pwj2012@gmail.com |
130b6512484065d4534c3cc77c76a9869d44fb1d | 9dcac6f93c2e460009e3355976989adf3bf1af68 | /PrintSum.py | 3bfb387f9a676c65a8c7e920354df4dc5c3b67e6 | [] | no_license | lpham4/PythonPractice | 99a4db621a6e524b2264314f1d4d47e2474260f9 | fac0931d09441ad03c4b34abae01f928342d53d7 | refs/heads/main | 2023-01-02T11:56:39.192524 | 2020-10-21T23:45:52 | 2020-10-21T23:45:52 | 306,173,850 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 416 | py | # Class: 1321L
# Section: 02
# Term: Fall 2018
# Instructor: Malcolm
# Name: Ly Pham
# Lab: Python
integer = int(input('Enter an integer between 1 and 100: '))
print('You entered:', integer)
if integer < 1 or integer > 100:
print('Invalid input. Try again.')
else:
count = 0
sum = 0
while count <= integ... | [
"lpham4@students.kennesaw.edu"
] | lpham4@students.kennesaw.edu |
0f5ce3b78bff791a5a68f6e7abc26fc45e210335 | 6f6997efe1a15d57688c12ff0197790fb2eac6bc | /database/old/Init_analysisdb.py | 1c3641363d82c7f49cc1994332fc27e6559afddc | [] | no_license | montanaviking/waferprobe | 29fa5f0eb07e60820162916e48059f63374902c5 | fb2786b376153f9b6e9495b6faf3ee5960f90a06 | refs/heads/master | 2022-11-06T10:57:01.539733 | 2020-06-19T23:47:59 | 2020-06-19T23:47:59 | 273,601,408 | 4 | 0 | null | null | null | null | UTF-8 | Python | false | false | 680 | py | # Phil Marsh Carbonics
# initialize database
from sqlalchemy.ext.declarative import declarative_base
from datetime import datetime
from sqlalchemy import (Column, Integer, Numeric, String, DateTime, ForeignKey, Boolean, create_engine)
from sqlalchemy.orm import relationship, backref, sessionmaker
Base=declarative_base... | [
"microcraftx@gmail.com"
] | microcraftx@gmail.com |
4f98779fdde462765812a9d5470c61c3ca5eb16d | 442dae0500db1653541100292a356ab6452363da | /alchemy/test/autoencoder_test.py | 27b9d8e0d4d73dda490f172cd0b0abfcaf1ae4a2 | [
"MIT"
] | permissive | williamd4112/alchemy | b5da5092abd29f2541f0e91c4ed5da033318b9f5 | 6ca509aa2e332170666a67a53bea22f7749c2bc7 | refs/heads/master | 2021-09-07T22:57:15.198254 | 2018-03-02T15:30:27 | 2018-03-02T15:30:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 955 | py | # -*- coding: utf-8 -*-
import numpy as np
import tensorflow as tf
import unittest
from alchemy import layers, utils
class AutoEncoderTest(unittest.TestCase):
def test_conv2d_autoencoder(self):
tf.reset_default_graph()
inputs_ph = tf.placeholder(tf.float32, [None, 8, 8, 1])
scope = 'autoencoder'
... | [
"samwenke@gmail.com"
] | samwenke@gmail.com |
6f5a06f1011e0d3399391a74601845265556fd8b | f6348e051252ad0be630a815e33a3f85fbe64c69 | /capture/noworkflow/now/persistence/models/environment_attr.py | a367c23b7af82ec6f6631b0f5bae34e22e5c1dad | [
"MIT"
] | permissive | stefan-grafberger/noworkflow | 74f3e2fd0358621ac785a5f1441645be2d69688b | cbb8964eba7d58a5e87f96fb5bb91ac452b80763 | refs/heads/master | 2023-01-06T02:51:27.881742 | 2020-04-15T21:18:29 | 2020-04-15T21:18:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,083 | py | # Copyright (c) 2016 Universidade Federal Fluminense (UFF)
# Copyright (c) 2016 Polytechnic Institute of New York University.
# This file is part of noWorkflow.
# Please, consult the license terms in the LICENSE file.
"""Environment Attribute Model"""
from __future__ import (absolute_import, print_function,
... | [
"joaofelipenp@gmail.com"
] | joaofelipenp@gmail.com |
c112fd035736511a5982689e9b5805ab59d9d74e | 48bee4325136caea5a0aa447a16f000382ba2192 | /src/class_based_views/urls.py | 24eb4fea926bd62e596c49aaf2864d6748c060d8 | [] | no_license | nova-sangeeth/book_stack_django | f960e39beb929ee829cf0d4555de27a22ca98ee2 | a1e551f364ee6616b4b7804f14bfa493a1170936 | refs/heads/master | 2021-03-21T18:38:09.827632 | 2020-03-17T16:03:38 | 2020-03-17T16:03:38 | 247,321,071 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 810 | py | """class_based_views URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.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')
C... | [
"novasangeeth@outlook.com"
] | novasangeeth@outlook.com |
ef497c88746e8bec9bf1fe0a637dd05339029c94 | 73361fc6f7ecd9a19359a828b2574499a991bde4 | /gallery2/alembic/versions/3b387b077506_tags.py | 0e50457320a7e40f4de8f43b0812513c399eb1f1 | [] | no_license | danjac/gallery2 | 3a28cd3ca364a30eaf277bfd9db3cac72dd2463a | ff8c50bdfc30d9ac5fff910589b7f976a4b40bcf | refs/heads/master | 2020-05-19T07:59:00.047308 | 2014-01-15T13:44:06 | 2014-01-15T13:44:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,272 | py | """tags
Revision ID: 3b387b077506
Revises: 48641cbf69d7
Create Date: 2014-01-11 11:01:56.791153
"""
# revision identifiers, used by Alembic.
revision = '3b387b077506'
down_revision = '48641cbf69d7'
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated by Alembic - please ad... | [
"danjac354@gmail.com"
] | danjac354@gmail.com |
372bd628e91fbeb9aec915bafa8af0824234caf7 | a0e777ea7e0d00c061068db132a30a8fa545cc75 | /FluentPython/coro_exc_demo.py | d91049232e9f0fe4694695ec88f001a1a1574ad1 | [] | no_license | aadisetyaa/Python-Cookbook | 87215b64d2d3631d6b18e90a68a09400e7d80919 | a8df0343a39725312686423296bfd860dbaf70ad | refs/heads/master | 2022-04-08T13:41:27.255352 | 2017-11-27T03:54:29 | 2017-11-27T03:54:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 821 | py | class DemoException(Exception):
"""An exception type for the demonstration."""
def demo_exc_handling():
print('-> coroutine started')
while True:
try:
x = yield
except DemoException:
print('*** DemoException handled. Continuing...')
else:
print('-> coroutine received: {!r}'.format(x))
raise RuntimeE... | [
"wpr101@hotmail.com"
] | wpr101@hotmail.com |
33c243c408ec59eec4ffca44e97be6a52731d741 | 8d753bb8f19b5b1f526b0688d3cb199b396ed843 | /osp_sai_2.1.8/system/apps/rpcapi/vcl/config.py | 9b18d6ac23705afdaa4d0d8f5c3548bd9a168816 | [] | no_license | bonald/vim_cfg | f166e5ff650db9fa40b564d05dc5103552184db8 | 2fee6115caec25fd040188dda0cb922bfca1a55f | refs/heads/master | 2023-01-23T05:33:00.416311 | 2020-11-19T02:09:18 | 2020-11-19T02:09:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 597 | py | #!/usr/bin/python
#-*- coding: utf-8 -*-
is_dev = True
remote = '10.10.39.167'
dut_regexp = r'DUT\d#'
dut_stdout_pwd_info = r'Password:'
shell_pwd = '!@#'
cmd_regexp = r'\[\w+@.+\]\$'
login_stdout_username_info = r'Username:'
login_stdout_pwd_info = r'Password:'
login_username = 'admin'
login_pwd = 'admin'
RPC_ERROR... | [
"zhwwan@gmail.com"
] | zhwwan@gmail.com |
ab0c31da7017d28b92c6f4359ffeff58c6e480e1 | af4b5830b2a23d1f3d126297c7eb057bb3f8e42f | /pymatflow/cp2k/base/pw_dft_iterative_solver.py | add890dd42de47199b7e0d715dad071d6063957a | [
"MIT"
] | permissive | mukhtarbayerouniversity/pymatflow | de2b2d573ceed68c1dd3c149c538588394029137 | 9ab61e56659519cd6c83d5bd32da1262f44da065 | refs/heads/master | 2023-02-13T01:50:32.993401 | 2021-01-13T15:19:36 | 2021-01-13T15:19:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,063 | py | #!/usr/bin/evn python
# _*_ coding: utf-8 _*_
import numpy as np
import sys
import os
import shutil
"""
usage:
"""
# ============================================
# CP2K / PW_DFT / ITERATIVE_SOLVER
#=============================================
class cp2k_pw_dft_iterative_solver:
"""
""... | [
"deqi_tang@163.com"
] | deqi_tang@163.com |
4595c1a0ffd3faf673a9269141df638ad665012f | 37d5b97c54e48f3de690724c01f3b14248c2b194 | /origin/cartpole-a3c.py | 42cb24898277d39b5f3ade93e1e7f38d89d786f2 | [] | no_license | verystrongjoe/a3c-sketch | ae9e60ee87155b7991a7fab4dfa55702e4cc56e9 | 7c8d9bfc76396ef652b609f1b366f98807adbf53 | refs/heads/master | 2020-03-06T14:41:04.358586 | 2018-05-08T09:37:32 | 2018-05-08T09:37:32 | 126,940,203 | 4 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,911 | py | import threading
import numpy as np
import tensorflow as tf
import pylab
import time
import gym
from keras.layers import Dense, Input
from keras.models import Model
from keras.optimizers import Adam
from keras import backend as K
# global variables for threading
episode = 0
scores = []
EPISODES = 2000
# This is A3C(... | [
"verystrongjoe@gmail.com"
] | verystrongjoe@gmail.com |
d6f6ff67d8a4ab492c8c24d10ca6a25088ee5e15 | de59ece5d773d8607ba7afe747088ff07062494c | /py-core/tuples/tuples.py | 6198cdf35d43671e60083fd9e761259bb727ab13 | [] | no_license | loggar/py | 4094c6919b040dfc0bb5453dc752145b5f3b46ba | 1116969fa6de00bbc30fe8dcf6445aa46190e506 | refs/heads/master | 2023-08-21T16:47:41.721298 | 2023-08-14T16:12:27 | 2023-08-14T16:12:27 | 114,955,782 | 0 | 0 | null | 2023-07-20T15:11:04 | 2017-12-21T03:01:54 | Python | UTF-8 | Python | false | false | 556 | py | tuple1 = ('abcd', 786, 2.23, 'john', 70.2)
tinytuple = (123, 'john')
print(tuple1) # Prints complete tuple
print(tuple1[0]) # Prints first element of the tuple
print(tuple1[1:3]) # Prints elements starting from 2nd till 3rd
print(tuple1[2:]) # Prints elements starting from 3rd element
print... | [
"webnl@DT-Charly.koi.local"
] | webnl@DT-Charly.koi.local |
9f25f18ca52a83de85052b14daa2717fc9df8fc1 | 13a416a2694d1f6aa1a68cd47610236bf61cafbc | /BasicConcept/hex_oct_bin.py | a8b18ae593af3c90d6a27996c1f0464a99110a3f | [] | no_license | Highjune/Python | c637f7d0f9e5d1ac9d6ad87b4e54833b8ff4ae11 | 1be43816d22f5f3b8679cf0cd3939e9d9f54497a | refs/heads/master | 2022-11-24T01:20:54.470172 | 2020-07-27T18:01:47 | 2020-07-27T18:01:47 | 263,271,337 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 59 | py | a = 128
print(a)
print(hex(a))
print(oct(a))
print(bin(a))
| [
"highjune37@gmail.com"
] | highjune37@gmail.com |
7f78e5f3f6a29d10301db18f96bebe97812cf0ac | e3365bc8fa7da2753c248c2b8a5c5e16aef84d9f | /indices/nneliza.py | 528eb4b8269e9139fcfcfc93d5170548eef4edfd | [] | no_license | psdh/WhatsintheVector | e8aabacc054a88b4cb25303548980af9a10c12a8 | a24168d068d9c69dc7a0fd13f606c080ae82e2a6 | refs/heads/master | 2021-01-25T10:34:22.651619 | 2015-09-23T11:54:06 | 2015-09-23T11:54:06 | 42,749,205 | 2 | 3 | null | 2015-09-23T11:54:07 | 2015-09-18T22:06:38 | Python | UTF-8 | Python | false | false | 295 | py | ii = [('CookGHP.py', 1), ('LeakWTI2.py', 1), ('ClarGE2.py', 1), ('CrokTPS.py', 1), ('GilmCRS.py', 3), ('WadeJEB.py', 7), ('LeakWTI4.py', 1), ('WheeJPT.py', 11), ('MereHHB3.py', 2), ('FitzRNS.py', 1), ('LewiMJW.py', 1), ('ClarGE3.py', 3), ('DibdTRL.py', 1), ('HogaGMM2.py', 7), ('ClarGE4.py', 1)] | [
"varunwachaspati@gmail.com"
] | varunwachaspati@gmail.com |
aa6662318c74771c0ab32e588e4a200a782bdb3a | 556db265723b0cc30ad2917442ed6dad92fd9044 | /tensorflow/python/client/pywrap_tf_session.py | 96f42ef026b82b874aacfc3b1778ce72ac5c3785 | [
"MIT",
"Apache-2.0",
"BSD-2-Clause"
] | permissive | graphcore/tensorflow | c1669b489be0e045b3ec856b311b3139858de196 | 085b20a4b6287eff8c0b792425d52422ab8cbab3 | refs/heads/r2.6/sdk-release-3.2 | 2023-07-06T06:23:53.857743 | 2023-03-14T13:04:04 | 2023-03-14T13:48:43 | 162,717,602 | 84 | 17 | Apache-2.0 | 2023-03-25T01:13:37 | 2018-12-21T13:30:38 | C++ | UTF-8 | Python | false | false | 2,973 | py | # Copyright 2019 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... | [
"gardener@tensorflow.org"
] | gardener@tensorflow.org |
8b0b6d0d068e5c0c0d871706b8de364a8b45b874 | 805593291790843645dc884616c2a672f9cf953a | /graph/spanning_tree/kuraskal.py | 9959bd549a7ac8edeac8ec868b9f23f7ff5978db | [] | no_license | Shumpei-Kikuta/library | 1aa3e5aa1a619734441b431eaf2a872784030ee0 | cfa5a035df2e98641259032c936e063767e53230 | refs/heads/master | 2020-08-03T01:03:31.859006 | 2019-10-25T01:58:30 | 2019-10-25T01:58:30 | 211,575,648 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,336 | py | """クラスカル法"""
class Node:
def __init__(self, idx):
self.idx = idx
self.parent = None
def unite(x: Node, y: Node, nodes):
"""xを含む集合とyを含む集合を併合"""
x_root, x_depth = root(x, 0)
y_root, y_depth = root(y, 0)
# xの根を併合後の根とする
if y_root != x_root:
if x_depth >= y_depth:
... | [
"shunpei-kikuta775@g.ecc.u-tokyo.ac.jp"
] | shunpei-kikuta775@g.ecc.u-tokyo.ac.jp |
2e9b4bb92dd86faf0815ab836243cd924a9fd5ca | 54f352a242a8ad6ff5516703e91da61e08d9a9e6 | /Source Codes/AtCoder/abc088/C/4904355.py | 50700176dd66473e27c6decd361c1ba164066058 | [] | no_license | Kawser-nerd/CLCDSA | 5cbd8a4c3f65173e4e8e0d7ed845574c4770c3eb | aee32551795763b54acb26856ab239370cac4e75 | refs/heads/master | 2022-02-09T11:08:56.588303 | 2022-01-26T18:53:40 | 2022-01-26T18:53:40 | 211,783,197 | 23 | 9 | null | null | null | null | UTF-8 | Python | false | false | 537 | py | c1 = list(map(int, input().rstrip().split()))
c2 = list(map(int, input().rstrip().split()))
c3 = list(map(int, input().rstrip().split()))
answer = 'No'
#a1?????a2,a3,b1,b2,b3?????????
for i in range(101):
a1 = i
b1 = c1[0] - a1
b2 = c1[1] - a1
b3 = c1[2] - a1
a2 = c2[0] - b1
a3 = c3[0... | [
"kwnafi@yahoo.com"
] | kwnafi@yahoo.com |
bbc37a7671145d04d2e64fa21022a08e44c18e17 | 16e69196886254bc0fe9d8dc919ebcfa844f326a | /edc/subject/registration/migrations/0019_auto__add_registeredsubjectaudit.py | 21cbfc809d495d0a1dcf484b56bf849769ed7729 | [] | no_license | botswana-harvard/edc | b54edc305e7f4f6b193b4498c59080a902a6aeee | 4f75336ff572babd39d431185677a65bece9e524 | refs/heads/master | 2021-01-23T19:15:08.070350 | 2015-12-07T09:36:41 | 2015-12-07T09:36:41 | 35,820,838 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 16,421 | py | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'RegisteredSubjectAudit'
db.create_table('bhp_registration_registeredsubject_audit', (
... | [
"ew2789@gmail.com"
] | ew2789@gmail.com |
631fc594d1affe6040910bd0d37faf606980fb06 | f8ff84f02d6dfa66d003890c4f51ea575232ba93 | /keystone/keystone/tests/unit/contrib/federation/test_utils.py | b59c234707f65898545269f1b426d442d93797df | [
"Apache-2.0"
] | permissive | zarson/stack | 8d341463bdf0136447bf1ada5be943df8ba55a4b | 827003bc566ed992f754618063a771694e51cfca | refs/heads/master | 2021-06-03T00:49:19.075199 | 2016-05-12T07:45:35 | 2016-05-12T07:45:35 | 58,616,957 | 0 | 1 | null | 2020-07-24T01:59:08 | 2016-05-12T07:08:17 | Python | UTF-8 | Python | false | false | 31,784 | py | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | [
"zhangsheng1730@hotmail.com"
] | zhangsheng1730@hotmail.com |
d3ee9535e42a5f92a997d4814a06b0f8fa25b6c0 | 41a4887a52afe81f203d0917c5ef54ccbe2389fe | /toys/kids/flip_fen.py | 2cc78123c07ce81bb982af2c037ea82d657d8293 | [] | no_license | tgandor/meats | 2efc2e144fc59b2b99aeeaec5f5419dbbb323f9b | 26eb57e49752dab98722a356e80a15f26cbf5929 | refs/heads/master | 2023-08-30T20:35:47.949622 | 2023-08-25T13:26:23 | 2023-08-25T13:26:23 | 32,311,574 | 13 | 9 | null | 2022-06-22T20:44:44 | 2015-03-16T08:39:21 | Python | UTF-8 | Python | false | false | 193 | py | #!/usr/bin/env python
import sys
while True:
line = sys.stdin.readline().split()
if not line:
break
line[0] = '/'.join(line[0].split('/')[::-1])
print(' '.join(line))
| [
"tomasz.gandor@gmail.com"
] | tomasz.gandor@gmail.com |
fb9f4d947e866e83113c59be6505f37dfa281a96 | 93713f46f16f1e29b725f263da164fed24ebf8a8 | /Library/lib/python3.7/site-packages/bokeh-1.4.0-py3.7.egg/bokeh/_testing/plugins/bokeh.py | 9eca47f2d22a7519f60557c494a504860efd575b | [
"BSD-3-Clause"
] | permissive | holzschu/Carnets | b83d15136d25db640cea023abb5c280b26a9620e | 1ad7ec05fb1e3676ac879585296c513c3ee50ef9 | refs/heads/master | 2023-02-20T12:05:14.980685 | 2023-02-13T15:59:23 | 2023-02-13T15:59:23 | 167,671,526 | 541 | 36 | BSD-3-Clause | 2022-11-29T03:08:22 | 2019-01-26T09:26:46 | Python | UTF-8 | Python | false | false | 9,586 | py | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2019, Anaconda, Inc., and Bokeh Contributors.
# All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#-------------------------------------------------------------------... | [
"nicolas.holzschuch@inria.fr"
] | nicolas.holzschuch@inria.fr |
85b78518837e1b6109966119e16266b004ade7f8 | d66818f4b951943553826a5f64413e90120e1fae | /hackerrank/10 Days of Statistics/Day 8 - Least Square Regression Line/test.py | f5478d0354c945b2bef65095410b7eec0bb973e3 | [
"MIT"
] | permissive | HBinhCT/Q-project | 0f80cd15c9945c43e2e17072416ddb6e4745e7fa | 19923cbaa3c83c670527899ece5c3ad31bcebe65 | refs/heads/master | 2023-08-30T08:59:16.006567 | 2023-08-29T15:30:21 | 2023-08-29T15:30:21 | 247,630,603 | 8 | 1 | MIT | 2020-07-22T01:20:23 | 2020-03-16T06:48:02 | Python | UTF-8 | Python | false | false | 521 | py | import io
import unittest
from contextlib import redirect_stdout
from unittest.mock import patch
class TestQ(unittest.TestCase):
@patch('builtins.input', side_effect=[
'95 85',
'85 95',
'80 70',
'70 65',
'60 70',
])
def test_case_0(self, input_mock=None):
te... | [
"hbinhct@gmail.com"
] | hbinhct@gmail.com |
c4d3467d4d06eb14220feda8004d28995b35fb8d | 8acffb8c4ddca5bfef910e58d3faa0e4de83fce8 | /ml-flask/Lib/site-packages/sklearn/metrics/cluster/setup.py | ee0fc49bd4888209bfc12eab6d56e2a17ddf12c9 | [
"MIT"
] | permissive | YaminiHP/SimilitudeApp | 8cbde52caec3c19d5fa73508fc005f38f79b8418 | 005c59894d8788c97be16ec420c0a43aaec99b80 | refs/heads/master | 2023-06-27T00:03:00.404080 | 2021-07-25T17:51:27 | 2021-07-25T17:51:27 | 389,390,951 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 128 | py | version https://git-lfs.github.com/spec/v1
oid sha256:e3107d1ba6c899cf749991d704ff933206baa46ff4c7d81e504222277355d67d
size 667
| [
"yamprakash130@gmail.com"
] | yamprakash130@gmail.com |
304935338bad968454868794f114987185cb098c | 39d4504ec1da8975fac526d6801b94f4348b6b61 | /research/morph_net/network_regularizers/flop_regularizer_test.py | 2993cf87269d9d58ed03a97ed5e99a4530de23d4 | [
"Apache-2.0"
] | permissive | vincentcheny/models | fe0ff5888e6ee00a0d4fa5ee14154acdbeebe7ad | afb1a59fc1bc792ac72d1a3e22e2469020529788 | refs/heads/master | 2020-07-23T21:38:24.559521 | 2019-11-15T07:50:11 | 2019-11-15T07:50:11 | 207,712,649 | 1 | 0 | Apache-2.0 | 2019-09-11T03:12:31 | 2019-09-11T03:12:31 | null | UTF-8 | Python | false | false | 21,594 | py | # Copyright 2018 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 ... | [
"1155107977@link.cuhk.edu.hk"
] | 1155107977@link.cuhk.edu.hk |
8fcbd338b424590aa21d59e3c91d905708a89c6c | 1be3fd4f49ff1ba41b36bdb45ad1cd738b7e2e97 | /动态规划/序列型动态规划/LeetCode53_最大子序和.py | 6e96ab053d5009923bc8cc47501246da1dcd9274 | [] | no_license | ltzp/LeetCode | d5dcc8463e46b206515c1205582305d8ce981cc5 | f43d70cac56bdf6377b22b865174af822902ff78 | refs/heads/master | 2023-07-28T02:36:44.202092 | 2021-09-08T15:55:09 | 2021-09-08T15:55:09 | 308,343,739 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 984 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2021/04/09
# @Author : yuetao
# @Site :
# @File : LeetCode53_最大子序和.py
# @Desc :
"""
输入:nums = [-2,1,-3,4,-1,2,1,-5,4]
输出:6
解释:连续子数组 [4,-1,2,1] 的和最大,为 6 。
在状态的计算过程中我们可以发现,后面状态的计算只与当前状态的值有关,而与此阶段之前的值无关,所以具有无后效性。
"""
class Solution(object):
def ma... | [
"806518802@qq.com"
] | 806518802@qq.com |
d7b51f7ff602b1bd5707500365b2f4011d95eb01 | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/adjectives/_ethiopian.py | c12e2d18374d3610fe33cc409fbae8d3b9221e7b | [
"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 | 414 | py |
#calss header
class _ETHIOPIAN():
def __init__(self,):
self.name = "ETHIOPIAN"
self.definitions = [u'belonging to or relating to Ethiopia or its people']
self.parents = []
self.childen = []
self.properties = []
self.jsondata = {}
self.specie = 'adjectives'
def run(self, obj1, obj2):
self.jsond... | [
"xingwang1991@gmail.com"
] | xingwang1991@gmail.com |
bd58733911b35cc559924bee35b1bcf22c6073f3 | 7e5cfebee3b9a5ed4c7dac67b59346d8a0e3f989 | /john1/apps.py | d812bd37b5228e2d1fa96f594a13a5a1a8a5ca44 | [] | no_license | Hasnain-4/Blog-Todo-Shop | fd64f5ec194ce182f73f20f69110ab6ca762ba1f | 0dccf9c3e48c8fd3cb1eb973e0ffe9596dd5c32d | refs/heads/master | 2023-01-05T09:56:19.034169 | 2020-11-07T06:55:56 | 2020-11-07T06:55:56 | 308,890,501 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 85 | py | from django.apps import AppConfig
class John1Config(AppConfig):
name = 'john1'
| [
"ansarihasnain3598@gmail.com"
] | ansarihasnain3598@gmail.com |
c8609399aa50011c76fc5e290f0e4ee907c1c282 | e4fcd551a9d83e37a2cd6d5a2b53a3cc397ccb10 | /codes/t2i_models/CogView2/SwissArmyTransformer-main/examples/roberta/finetune_roberta_rte.py | 2a97af8db773d45f62776f782c3b787a6622c713 | [
"Apache-2.0"
] | permissive | eslambakr/HRS_benchmark | 20f32458a47c6e1032285b44e70cf041a64f842c | 9f153d8c71d1119e4b5c926b899bb556a6eb8a59 | refs/heads/main | 2023-08-08T11:57:26.094578 | 2023-07-22T12:24:51 | 2023-07-22T12:24:51 | 597,550,499 | 33 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,667 | py | import os
import torch
import argparse
import numpy as np
from SwissArmyTransformer import mpu, get_args
from SwissArmyTransformer.training.deepspeed_training import training_main
from roberta_model import RobertaModel
from SwissArmyTransformer.model.mixins import PrefixTuningMixin, MLPHeadMixin
class Classification... | [
"islam.bakr.2017@gmail.com"
] | islam.bakr.2017@gmail.com |
17d251d9dfe4693be09b37532fad90b492e6416d | 11ccb6827cf643b37c44a2e174422f9c6f9497f2 | /falcon/bench/dj/manage.py | 1ed3638a4df1bec17ec47502b337b01f857ace4a | [
"LicenseRef-scancode-warranty-disclaimer",
"Apache-2.0"
] | permissive | falconry/falcon | 7506f838520e5105714702d9a9b2f0e608a704b9 | 32207fe8a7ebdfb95271d8430c4977c7a654928c | refs/heads/master | 2023-08-31T05:32:03.755869 | 2023-08-21T21:45:34 | 2023-08-21T21:45:34 | 7,040,500 | 8,922 | 1,183 | Apache-2.0 | 2023-09-09T20:58:36 | 2012-12-06T18:17:51 | Python | UTF-8 | Python | false | false | 808 | py | #!/usr/bin/env python
import os
import sys
if __name__ == '__main__':
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'dj.settings')
try:
from django.core.management import execute_from_command_line
except ImportError:
# The above import may fail for some other reason. Ensure that the
... | [
"john.vrbanac@linux.com"
] | john.vrbanac@linux.com |
78e28807403ebdbf2c4fe8e40201ff5e0fc9d861 | b8cc6d34ad44bf5c28fcca9e0df01d9ebe0ee339 | /入门学习/datetime_eg.py | a136cabe3d671ca43e319ccc8cc933f54ffd180a | [] | no_license | python-yc/pycharm_script | ae0e72898ef44a9de47e7548170a030c0a752eb5 | c8947849090c71e131df5dc32173ebe9754df951 | refs/heads/master | 2023-01-05T06:16:33.857668 | 2020-10-31T08:09:53 | 2020-10-31T08:09:53 | 296,778,670 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,398 | py | #coding:utf-8
import datetime
#datetime常见属性
#datetime.date():一个理想和的日期,提供year,month,day属性
dt = datetime.date(2018,3,26)
print(dt)
print(dt.day)
print(dt.year)
print(dt.month)
#datetime.time:提供一个理想和的时间
#datetime.datetime:提供日期与实践的组合
#datetime.timedelta:提供一个时间差,时间长度
from datetime import datetime
import time
#常用类方法:today、n... | [
"15655982512.com"
] | 15655982512.com |
f044f713fb899779529717704ff3f507de299d33 | a905f5b56732cb49d5d692b75c7334d772b67144 | /Gui/t2.py | bf8c4c91ef955c1e02ec9ad8aec3f390ced0d5f7 | [] | no_license | weilaidb/PythonExample2 | d859acee3eb3e9b6448553b4f444c95ab2b2fc8f | 492fa2d687a8f3b9370ed8c49ffb0d06118246c7 | refs/heads/master | 2022-04-20T00:35:35.456199 | 2020-04-26T00:32:12 | 2020-04-26T00:32:12 | 114,774,595 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 770 | py | '''''5.向Listbox中添加一个item'''
# 以上的例子均使用了insert来向Listbox中添加 一个item,这个函数有两个属性一个为添加的索引值,另一个为添加的项(item)
# 有两个特殊的值ACTIVE和END,ACTIVE是向当前选中的item前插入一个(即使用当前选中的索引作为插入位置);END是向
# Listbox的最后一项添加插入一项
# 先向Listbox中追加三个item,再在Listbox开始添加三项
from tkinter import *
root = Tk()
lb = Listbox(root)
for item in ['python','tkinter','widget']... | [
"wxjlmr@126.com"
] | wxjlmr@126.com |
374eb79ae24863d43ed492b428e933b87a306275 | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_43/66.py | 6e5512c1daca685a498a0b628f17dadb6578b723 | [] | 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 | 806 | py | import sys
lines = sys.stdin.readlines()
i = 1
while i<len(lines):
s = set()
msg = lines[i].rstrip()
for each in msg:
s.add(each)
#print len(s)
maxbase = len(s)
if maxbase == 1:
maxbase = 2
cost = maxbase ** (len(msg)-1)
cands = range(len(s))
cands.reverse()
tr... | [
"miliar1732@gmail.com"
] | miliar1732@gmail.com |
5925428ff96b79d625eb9f6608d44301fe70d7e7 | 7298d1692c6948f0880e550d6100c63a64ce3ea1 | /catalog-configs/PDB/ihm_entity_poly_segment.py | f4913948c672c471483fa197dce530de14411c3e | [] | no_license | informatics-isi-edu/protein-database | b7684b3d08dbf22c1e7c4a4b8460248c6f0d2c6d | ce4be1bf13e6b1c22f3fccbb513824782609991f | refs/heads/master | 2023-08-16T10:24:10.206574 | 2023-07-25T23:10:42 | 2023-07-25T23:10:42 | 174,095,941 | 2 | 0 | null | 2023-06-16T19:44:43 | 2019-03-06T07:39:14 | Python | UTF-8 | Python | false | false | 11,355 | py | import argparse
from attrdict import AttrDict
from deriva.core import ErmrestCatalog, get_credential, DerivaPathError
from deriva.utils.catalog.components.deriva_model import DerivaCatalog
import deriva.core.ermrest_model as em
from deriva.core.ermrest_config import tag as chaise_tags
from deriva.utils.catalog.manage.u... | [
"carl@isi.edu"
] | carl@isi.edu |
52b9507585c470c8c272b918d3b8c1f3741990ae | 651a296c8f45b5799781fd78a6b5329effe702a0 | /subset/i4_sqrt.py | 15231735ca1b9e9e6b31120a626bc3326da2d377 | [] | no_license | pdhhiep/Computation_using_Python | 095d14370fe1a01a192d7e44fcc81a52655f652b | 407ed29fddc267950e9860b8bbd1e038f0387c97 | refs/heads/master | 2021-05-29T12:35:12.630232 | 2015-06-27T01:05:17 | 2015-06-27T01:05:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,042 | py | #!/usr/bin/env python
def i4_sqrt ( n ):
#*****************************************************************************80
#
## I4_SQRT finds the integer square root of N by solving N = Q^2 + R.
#
# Discussion:
#
# The integer square root of N is an integer Q such that
# Q^2 <= N but N < (Q+1)^2.
#
# A simpl... | [
"siplukabir@gmail.com"
] | siplukabir@gmail.com |
e03a27d2244db7374620a0b5dca2991593c42218 | 59d5a801dd8361fe2b68f0cdfc1a0c06bbe9d275 | /Competition/恶意样本检测/features/common.py | 39b15781ba1fd25376c5b96c49ab1448724ab5da | [] | no_license | HanKin2015/Machine_to_DeepingLearning | 2ff377aa68655ca246eb19bea20fec232cec5d77 | 58fa8d06ef8a8eb0762e7cbd32a09552882c5412 | refs/heads/master | 2023-01-25T01:16:41.440064 | 2023-01-18T08:23:49 | 2023-01-18T08:23:49 | 134,238,811 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 10,837 | py | # -*- coding: utf-8 -*-
"""
文 件 名: common.py
文件描述: 公共文件库
作 者: HeJian
创建日期: 2022.06.15
修改日期:2022.06.16
Copyright (c) 2022 HeJian. All rights reserved.
"""
import os, re, time, datetime
os.environ['NUMEXPR_MAX_THREADS'] = '64'
import subprocess
from log import logger
from PIL import Image
import binasc... | [
"1058198502@qq.com"
] | 1058198502@qq.com |
bd49b4bc90efd2d2ceda83f672ca908ee94d8909 | 520e7d0bdc294e89e807ffc5d0277e0b1df035d4 | /taskloaf/object_ref.py | 4021c994f4aaf111c88d9cb39bd4b13d507c22d4 | [
"MIT"
] | permissive | tanwanirahul/taskloaf | 5a454e683dbf681f0a417911280c12176bd4a3a6 | 7f7b027ef18b8475922054ccc44dfcb5de0433bc | refs/heads/master | 2020-04-20T20:55:52.124091 | 2018-12-10T19:21:45 | 2018-12-10T19:21:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,008 | py | import asyncio
import taskloaf.serialize
import taskloaf.allocator
import taskloaf.refcounting
def put(worker, obj):
return FreshObjectRef(worker, obj)
def alloc(worker, nbytes):
ptr = worker.allocator.malloc(nbytes)
def on_delete(_id, worker = worker, ptr = ptr):
worker.allocator.free(ptr)
re... | [
"t.ben.thompson@gmail.com"
] | t.ben.thompson@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.