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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
c98bf9af78911012a5d580d8fab568dc0dd4d262 | 5aa0e5f32d529c3321c28d37b0a12a8cf69cfea8 | /client/gui_lib/GUIElement.py | 9e1b3576bea5c0ed0b0177d38d061da26e549710 | [] | no_license | sheepsy90/survive | 26495f1ff2d8247fbb9470882f8be9f5272e7f2c | 0eddf637be0eacd34415761b78fc2c9d50bc1528 | refs/heads/master | 2021-01-09T05:55:16.546762 | 2017-02-03T20:15:28 | 2017-02-03T20:15:28 | 80,864,391 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,463 | py | import pygame
class GUIElement(object):
TEXT = 2
BUTTON = 1
def __init__(self, name, rect):
self.name = name
self.x, self.y, self.width, self.height = rect
self.is_hover = False
self.gui_handler = None
self.focus = False
self.visible = True
self.z_... | [
"robert.kessler@klarna.com"
] | robert.kessler@klarna.com |
8bab37daf96d71aa280e74d681d7515f1291bf03 | c9f67529e10eb85195126cfa9ada2e80a834d373 | /lib/python3.5/site-packages/torch/distributions/geometric.py | 1e4b121cd7b4cfcccd548bf86ff634e3392b7ebe | [
"Apache-2.0"
] | permissive | chilung/dllab-5-1-ngraph | 10d6df73ea421bfaf998e73e514972d0cbe5be13 | 2af28db42d9dc2586396b6f38d02977cac0902a6 | refs/heads/master | 2022-12-17T19:14:46.848661 | 2019-01-14T12:27:07 | 2019-01-14T12:27:07 | 165,513,937 | 0 | 1 | Apache-2.0 | 2022-12-08T04:59:31 | 2019-01-13T14:19:16 | Python | UTF-8 | Python | false | false | 2,923 | py | from numbers import Number
import torch
from torch.distributions import constraints
from torch.distributions.distribution import Distribution
from torch.distributions.utils import broadcast_all, probs_to_logits, logits_to_probs, lazy_property, _finfo
from torch.nn.functional import binary_cross_entropy_with_logits
c... | [
"chilung.cs06g@nctu.edu.tw"
] | chilung.cs06g@nctu.edu.tw |
3387a7b1ab5c092a4be3f73958c4f37a2aec6a5c | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02683/s728076842.py | 530d406c4a8a8bf681c980d60d4d26bc44d72770 | [] | 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 | 390 | py | import numpy as np
n,m,x=map(int,input().split())
a=2**64
b=[np.array(list(map(int,input().split())),"i8")for i in range(n)]
for i in range(2**n):
c=bin(i)[2:]
c="0"*(n-len(c))+c
l=np.zeros(m)
q=0
for j in range(n):
if c[j]=="1":
q+=b[j][0]
l+=b[j][1:]
if np.min(l... | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
6aaba7d662a21da85d2ba3e6b178f7ecf8d58cd2 | e7b07f173a8bc0d36e046c15df7bbe3d18d49a33 | /parse.py | 9d1894ef9159fb1b51738dbba15b24d5bcb61bc0 | [] | no_license | jcarbaugh/makeitwrk | 82b6e8079b118e8d668b2e6858096a54da33d5a8 | 83801b19c120b4cf728b8342c4933fefe54b54d8 | refs/heads/master | 2020-04-06T04:55:56.785930 | 2011-08-26T19:09:27 | 2011-08-26T19:09:27 | 2,275,931 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 4,029 | py | #!/usr/bin/env python
from struct import pack, unpack
import sys
CHUNK_TYPES = {
1: 'TRACK_CHUNK',
2: 'STREAM_CHUNK',
4: 'METER_CHUNK',
5: 'TEMPO_CHUNK',
6: 'SYSEX_CHUNK',
7: 'MEMRGN_CHUNK',
10: 'TIMEBASE_CHUNK',
# variables
3: 'VARS_CHUNK',
26: 'VARS_CHUNK_VAR',
#... | [
"jcarbaugh@gmail.com"
] | jcarbaugh@gmail.com |
602bf5ff185fae424574e01f0d60bafdc9fad426 | 9d032e9864ebda8351e98ee7950c34ce5168b3b6 | /301.py | 10f8978082ea2c4ee7bbac60f631a00e920d68cf | [] | no_license | snpushpi/P_solving | e0daa4809c2a3612ba14d7bff49befa7e0fe252b | 9980f32878a50c6838613d71a8ee02f492c2ce2c | refs/heads/master | 2022-11-30T15:09:47.890519 | 2020-08-16T02:32:49 | 2020-08-16T02:32:49 | 275,273,765 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,269 | py | '''
Remove the minimum number of invalid parentheses in order to make the input string valid. Return all possible results.
Note: The input string may contain letters other than the parentheses ( and ).
Example 1:
Input: "()())()"
Output: ["()()()", "(())()"]
Example 2:
Input: "(a)())()"
Output: ["(a)()()", "(a(... | [
"55248448+snpushpi@users.noreply.github.com"
] | 55248448+snpushpi@users.noreply.github.com |
0285e95057b21742ade89d9041421eb988eb90fb | d79c152d072edd6631e22f886c8beaafe45aab04 | /nicolock/products/rest_urls.py | d58d9a92a31372b447067ee3dd7508ef1d810182 | [] | no_license | kabroncelli/Nicolock | 764364de8aa146721b2678c14be808a452d7a363 | 4c4343a9117b7eba8cf1daf7241de549b9a1be3b | refs/heads/master | 2020-03-11T11:02:43.074373 | 2018-04-18T17:38:33 | 2018-04-18T17:38:33 | 129,959,455 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 690 | py | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from django.conf.urls import url
from . import rest_views as views
urlpatterns = [
url(
regex=r'^products/(?P<pk>\d+)/$',
view=views.ProductDetail.as_view(),
name='product-detail'
),
url(
rege... | [
"brennen@lightningkite.com"
] | brennen@lightningkite.com |
d3527c75633bd397f54893cab6262bed50e53879 | d17d65a3ee48b307a46a0b95a05f04131668edbe | /TestSuite/runner.py | 6a172fc2702d50f5b6f0558a2beab1d4f677a319 | [] | no_license | qlcfj001/ui_test | 28fa370a6f912b2ff9a551c681d35a452c57ee02 | 25020af19d84c9c2b1bad02aca89cc881e828bbb | refs/heads/master | 2023-06-15T18:10:02.177702 | 2021-07-15T06:35:10 | 2021-07-15T06:35:10 | 386,012,875 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 376 | py | from Page.Base import base
from pageobjct.SearcH import Searchpage
from selenium.webdriver.common.by import By
#from TestSuite.Variablelayer.Variable import *
import time
import unittest
leave='成都'
leave_data="2021-07-20"
arrive='北京'
arrive_data='2021-07-30'
aa=Searchpage()
aa.search7(leave='成都',leave_data="2021-07-20"... | [
"you@example.com"
] | you@example.com |
06d3b8b17c46a0ae3faf7387123f73c73bea8d78 | 4766d241bbc736e070f79a6ae6a919a8b8bb442d | /20200215Python-China/0094. Binary Tree Inorder Traversal.py | 08893a77b8777c433e17edf90f755b8b4b58c958 | [] | no_license | yangzongwu/leetcode | f7a747668b0b5606050e8a8778cc25902dd9509b | 01f2edd79a1e922bfefecad69e5f2e1ff3a479e5 | refs/heads/master | 2021-07-08T06:45:16.218954 | 2020-07-18T10:20:24 | 2020-07-18T10:20:24 | 165,957,437 | 10 | 8 | null | null | null | null | UTF-8 | Python | false | false | 733 | py | '''
Given a binary tree, return the inorder traversal of its nodes' values.
Example:
Input: [1,null,2,3]
1
\
2
/
3
Output: [1,3,2]
Follow up: Recursive solution is trivial, could you do it iteratively?
'''
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, x):
# ... | [
"noreply@github.com"
] | yangzongwu.noreply@github.com |
552fea4e7e4a404550ffa6236bc4c30f22f33e18 | 3f9f7c73bb2f9da31c586d2b64e2cc94f35239dc | /django-polls/polls/tests/test_models.py | 94b7c24fbee98fcaf5c51ee69dd5ad670600b45b | [
"MIT"
] | permissive | jsterling23/DPY_Refresher | eb57e37d4bbad14143800719668b990b459fb56d | 4646b7ebd79ba853f5ccc172183f41257cc12b60 | refs/heads/master | 2020-03-23T19:11:32.626731 | 2018-07-29T01:17:49 | 2018-07-29T01:17:49 | 141,959,227 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,141 | py | from django.test import TestCase
import datetime
from django.utils import timezone
from ..models import Question
from django.urls import reverse
class QuestionModelTests(TestCase):
def test_was_published_recently_with_future_question(self):
# method should return false for future dated questions.
... | [
"jerrypadilla23@gmail.com"
] | jerrypadilla23@gmail.com |
e5fefc6b8e0ec0d00e467d6808038193d92e8aa7 | 683b73e0c95c755a08e019529aed3ff1a8eb30f8 | /machina/apps/forum_moderation/__init__.py | f1911a14dbd6195e896b647fa949fa08a0c6abce | [
"BSD-3-Clause"
] | permissive | DrJackilD/django-machina | b3a7be9da22afd457162e0f5a147a7ed5802ade4 | 76858921f2cd247f3c1faf4dc0d9a85ea99be3e1 | refs/heads/master | 2020-12-26T08:19:09.838794 | 2016-03-11T03:55:25 | 2016-03-11T03:55:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 217 | py | # -*- coding: utf-8 -*-
# Standard library imports
# Third party imports
# Local application / specific library imports
default_app_config = 'machina.apps.forum_moderation.registry_config.ModerationRegistryConfig'
| [
"morgan.aubert@zoho.com"
] | morgan.aubert@zoho.com |
c7ebc6f32e1358ed20f23dc25b3df7d6a66daf88 | 4aeaca4c58858125e844aad1cd988182201b5120 | /crane/files/timeHistoryParser.py | be957dd91e6668776b4c071a376eeffa2a646763 | [] | no_license | tkarna/crane | f18442a010af0909b7f5af9358cf9080ca1dd1e4 | b8313d0373d8206685d81aadccc425e432c6a010 | refs/heads/master | 2020-05-21T23:39:07.707777 | 2017-11-16T15:58:14 | 2017-11-16T15:58:14 | 53,163,424 | 1 | 2 | null | null | null | null | UTF-8 | Python | false | false | 2,357 | py | """
Read SELFE time history (.th) files to a data container.
Jesse Lopez - 2016-04-15
"""
import datetime
import argparse
import numpy as np
from crane.data import timeArray
from crane.data import dataContainer
class thParser(object):
def __init__(self, filename, start_time):
self.filename = filename... | [
"tuomas.karna@gmail.com"
] | tuomas.karna@gmail.com |
075c8636339cb3b08aa5c4c3815994408a005e38 | 853d7bd91f4ba254fba0ff28f2e0a3eb2b74fa48 | /errata_tool/release.py | b5c1211cb9a8c86556c758725ad9297bc11a9fbb | [
"MIT"
] | permissive | smunilla/errata-tool | b07614daeceda4a1bfc18ce59679be0a93bb084f | 91bdfb17f15308b46298210fbb2fe5af786276bc | refs/heads/master | 2020-04-10T00:18:12.471123 | 2018-11-19T17:33:02 | 2018-11-28T15:40:08 | 160,681,680 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,800 | py | from __future__ import print_function
import sys
from datetime import date
from errata_tool import ErrataConnector
from errata_tool.product import Product
from errata_tool.product_version import ProductVersion
from errata_tool.user import User
class NoReleaseFoundError(Exception):
pass
class MultipleReleasesFou... | [
"kdreyer@redhat.com"
] | kdreyer@redhat.com |
b9470a6364fcb617b3b2bbeb23ef97dce22221d7 | de6fb3a55196b6bd36a4fda0e08ad658679fb7a1 | /optin_manager/src/python/openflow/common/utils/formfields.py | adec249dc39015d89a6d299354718c9fd0f8e896 | [
"BSD-3-Clause",
"Apache-2.0"
] | permissive | dana-i2cat/felix | 4a87af639e4c7db686bfa03f1ae4ce62711615e3 | 059ed2b3308bda2af5e1942dc9967e6573dd6a53 | refs/heads/master | 2021-01-02T23:12:43.840754 | 2016-02-04T10:04:24 | 2016-02-04T10:04:24 | 17,132,912 | 4 | 4 | null | null | null | null | UTF-8 | Python | false | false | 388 | py | '''
Created on Jul 17, 2010
@author: jnaous
'''
from django import forms
from expedient.common.utils import validators
class MACAddressField(forms.CharField):
"""
A MAC Address form field.
"""
default_error_messages = {
'invalid': u'Enter a valid MAC address in "xx:xx:xx:xx:xx:xx" format.... | [
"jenkins@integration.localhost"
] | jenkins@integration.localhost |
22214c4cf02d9139ebf68302682f68b55190d51e | 3a7adfdcf7a5048045c8e95a93369a1796cfd532 | /conftest.py | 377ddc7028f2964dd5cf5621a68dc74e7967e513 | [
"BSD-3-Clause"
] | permissive | theGreenJedi/nixpy | e06025077d5d224a7d051532ebfbd48845339c58 | 40b5ecdaa9b074c7bf73137d1a94cb84fcbae5be | refs/heads/master | 2022-02-01T15:14:22.133157 | 2019-06-03T09:10:57 | 2019-06-03T09:10:57 | 197,896,640 | 1 | 0 | null | 2019-07-20T07:37:03 | 2019-07-20T07:37:02 | null | UTF-8 | Python | false | false | 808 | py | import pytest
import tempfile
from nixio.test.xcompat.compile import maketests
BINDIR = tempfile.mkdtemp(prefix="nixpy-tests-")
def pytest_addoption(parser):
parser.addoption("--nix-compat", action="store_true", default=False,
help=("Run nix compatibility tests "
... | [
"achilleas.k@gmail.com"
] | achilleas.k@gmail.com |
6a337ebcad790f7341970c4a3e71d1686f6229c6 | 333b405c1775475ddfa9ed3f4fa05c06b4c2e3f2 | /cv2/cvbackup/mycv_0.510464.py | c1b80110eb76fc4413a5cbbc9977af4cd86de47d | [] | no_license | daxiongshu/network | b77d5bb73dd353537f7687e61855d982cbd34464 | 842a778d310410ae39e58925257a9e9960ef560a | refs/heads/master | 2020-04-15T16:11:31.101188 | 2016-02-16T01:32:21 | 2016-02-16T01:32:21 | 51,798,576 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,405 | py | from xgb_classifier import xgb_classifier
import pandas as pd
import numpy as np
import pickle
from sklearn.ensemble import AdaBoostClassifier,ExtraTreesClassifier,RandomForestRegressor
from sklearn.preprocessing import LabelEncoder
from sklearn.metrics import roc_auc_score, f1_score, log_loss, make_scorer
from sklearn... | [
"aixueer4ever@gmail.com"
] | aixueer4ever@gmail.com |
d39dbb85f0ea8a843010ed2ff417e14430ec8b04 | ae381913c23385f004b82161624097645ba8c4c8 | /Huaxian_eemd/projects/plot_decompositions.py | 8dbd45db6556f91e1ce3f8e7adbb1107c6385152 | [
"MIT"
] | permissive | zjy8006/MonthlyRunoffForecastByAutoReg | aa37910fdc66276d0df9d30af6885209d4a4ebfc | 661fcb5dcdfbbb2ec6861e1668a035b50e69f7c2 | refs/heads/master | 2020-12-12T05:25:48.768993 | 2020-08-20T07:21:12 | 2020-08-20T07:21:12 | 259,588,564 | 7 | 3 | null | null | null | null | UTF-8 | Python | false | false | 271 | py | import pandas as pd
import os
root_path = os.path.dirname(os.path.abspath('__file__'))
import sys
sys.path.append(root_path)
from tools.plot_utils import plot_decompositions
signal = pd.read_csv(root_path+'/Huaxian_eemd/data/EEMD_TRAIN.csv')
plot_decompositions(signal)
| [
"zuojianyi@outlook.com"
] | zuojianyi@outlook.com |
613939625c016e2ed72cd4b6885baa6b413b8c7e | 5946112229fe1d9a04b7536f076a656438fcd05b | /dev_env/lib/python3.8/site-packages/pygments/styles/rrt.py | 2b1908794c8703c74074b3c356e1d1022988809b | [] | no_license | Gear-Droid/openCV_study_project | 3b117967eb8a28bb0c90088e1556fbc1d306a98b | 28c9a494680c4a280f87dd0cc87675dfb2262176 | refs/heads/main | 2023-05-14T14:27:42.284265 | 2021-06-05T00:16:09 | 2021-06-05T00:16:09 | 307,807,458 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 885 | py | # -*- coding: utf-8 -*-
"""
pygments.styles.rrt
~~~~~~~~~~~~~~~~~~~
pygments "rrt" theme, based on Zap and Emacs defaults.
:copyright: Copyright 2006-2020 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from pygments.style import Style
from pygments.toke... | [
"Vladi003@yandex.ru"
] | Vladi003@yandex.ru |
1400cc7e36dc1608eda6cf944b667fb37a1ea0b3 | b19dfd6a3ba5d107d110fb936de2e91d1d92bb99 | /venv/lib/python3.7/site-packages/Satchmo-0.9.3-py3.7.egg/shipping/modules/ups/config.py | 5c8e90a363eefc21999a9a0da571173a720a91b8 | [] | no_license | siddhant3030/djangoecommerce | d8f5b21f29d17d2979b073fd9389badafc993b5c | b067cb1155c778fece4634d0a98631a0646dacff | refs/heads/master | 2022-12-13T15:28:39.229377 | 2019-09-28T10:30:02 | 2019-09-28T10:30:02 | 207,240,716 | 2 | 1 | null | 2022-12-11T01:34:25 | 2019-09-09T06:35:36 | Python | UTF-8 | Python | false | false | 3,913 | py | from decimal import Decimal
from django.utils.translation import ugettext_lazy as _
from livesettings.values import StringValue,ConfigurationGroup,BooleanValue,DecimalValue,MultipleStringValue
from livesettings.functions import config_register_list,config_get
SHIP_MODULES = config_get('SHIPPING', 'MODULES')
SHIP_MODUL... | [
"ssiddhant3030@gmail.com"
] | ssiddhant3030@gmail.com |
4da4aa68a0cd83d1a57b20435439e06bad9395a2 | fc6f709f916fcd201938157990c77fa9202eefa7 | /model/optimizer.py | 4a9ee5afce8f27d52a2e33ea778b94ad326ffc29 | [
"MIT"
] | permissive | chenchy/StyleSpeech | 441ffd6d71ac0269d205ad66c9536fe00cb5267c | e0e4ad25681f9ecc2a01ba1b87cbe0c59472b792 | refs/heads/main | 2023-05-27T21:39:04.790584 | 2021-06-13T10:32:03 | 2021-06-13T11:26:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,650 | py | import torch
import numpy as np
class ScheduledOptimMain:
""" A simple wrapper class for learning rate scheduling """
def __init__(self, model, train_config, model_config, current_step):
self._optimizer = torch.optim.Adam(
model.parameters(),
betas=train_config["op... | [
"keonlee9420@gmail.com"
] | keonlee9420@gmail.com |
5b8aced9977d9f12adf0d4b703c3e25b1e55c899 | e16911f1fae7bf90f405e055e0f90731ae8c8042 | /etc/st2packgen/files/actions/lib/k8sbase.py | 89df63259b4fbf47136ae2a8cdf29077dfb9461e | [] | no_license | bobhenkel/stackstorm-kubernetes | 87136448434b1a6c821cfeb757f88833ca8ecf02 | 32b8538597bc5290a18cefadbf98fea7f8bb38bd | refs/heads/master | 2021-04-25T22:06:36.392650 | 2017-11-02T04:30:02 | 2017-11-02T04:30:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,242 | py | from __future__ import absolute_import
from pyswagger.core import BaseClient
from requests import Session, Request
import six
import json
import base64
class Client(BaseClient):
# declare supported schemes here
__schemes__ = set(['http', 'https'])
def __init__(self, config=None, auth=None, send_opt=No... | [
"andy@impulsed.net"
] | andy@impulsed.net |
c06bcf0c5bf8278caf07c0496ba1c817c184ba8d | 3d2e5d1092acccfb73c07d68b6beeffc44b3f776 | /imitation/src/environments/simulation/pybullet_env.py | 10ef9e12e56c2333e0813282dd5bdfe598ed1611 | [] | no_license | MatthijsBiondina/WorldModels | f6cbcfe5349da7119329ef10831810d1b85c9d02 | ab468f1aa978e3aa4e05174db24922085d1e33b1 | refs/heads/master | 2022-12-22T11:54:46.040828 | 2020-09-23T11:41:48 | 2020-09-23T11:41:48 | 248,212,491 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,560 | py | import gym
import pybulletgym
import numpy as np
from src.environments.general.environment_template import Environment
from src.utils import config as cfg
_ = pybulletgym
PREP_VECTORS = {'InvertedPendulumSwingupPyBulletEnv-v0': np.array([1, 0.2, 1, 1, 0.067], dtype=np.float16)}
def preprocess_observation(obs):
"... | [
"biondina.matthijs@gmail.com"
] | biondina.matthijs@gmail.com |
c8a58abf83afbf6366b65b7dc1ee8f6a5d6ef831 | 24ffbd64e1892ab633ca785e969ccef43f17a9f2 | /picomotor/devices/h2_yr.py | efa1098cd7f197e7875e4fee3720cf40bfa6fb58 | [] | no_license | yesrgang/labrad_tools.srq | e29fcbfc4f5228955de1faddab6a66df52ccdd03 | 0dfbf2609d2f7a7e499167decedb0d9ea3677978 | refs/heads/master | 2021-06-18T19:59:21.448762 | 2021-02-04T22:03:49 | 2021-02-04T22:03:49 | 155,478,765 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 155 | py | from picomotor.devices.nf8742.device import NF8742
class Motor(NF8742):
socket_address = ('192.168.1.20', 23)
controller_axis = 4
Device = Motor
| [
"yesrgang@gmail.com"
] | yesrgang@gmail.com |
092db6afd0b046dcf1485a91be052fd57d5c502e | a177931c2914cc9820c578add9d57aa6c75084ce | /tips/customHTML/test_genTABHTML.py | cfd92464403354ae73e44a3df5bc666a81d2eb93 | [] | no_license | zhangshoug/others | 45d94f96701362cb077eb994c27295247a6fb712 | 3a8a8366f2598a5e88b44d18d346e81f4eef659e | refs/heads/master | 2022-12-18T22:37:13.505543 | 2020-09-28T08:54:28 | 2020-09-28T08:54:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,021 | py | # -*- coding: utf-8 -*-
"""
-------------------------------------------------
File Name: test_genTABHTML
Description : tab css style test
Author : pchaos
date: 2019/9/9
-------------------------------------------------
Change Activity:
2019/9/9:
--------------------... | [
"drifthua@gmail.com"
] | drifthua@gmail.com |
6b7ec47b7dfaed08aeefb1d1ec11acaff71addf7 | 447e9ec821dc7505cc9b73fb7abeb220fe2b3a86 | /rvpy/logistic.py | 2d66e011e93fb9f8e4dc0e7ab086276b4445ba04 | [
"MIT"
] | permissive | timbook/rvpy | ecd574f91ed50fd47b6ead8517954f01e33c03a7 | 301fd61df894d4b300176e287bf9e725378c38eb | refs/heads/master | 2020-03-19T04:01:49.283213 | 2018-12-18T19:21:07 | 2018-12-18T19:21:07 | 135,788,512 | 1 | 0 | MIT | 2018-12-18T19:21:08 | 2018-06-02T04:55:39 | Python | UTF-8 | Python | false | false | 3,722 | py | import numpy as np
from math import log, exp
from scipy.stats import logistic, fisk
from . import distribution
class Logistic(distribution.Distribution):
"""
Logistic Distribution using the following parameterization:
f(x | loc, scale) = exp(-z) / (s * (1 + exp(-z))^2)
where z = (x - loc) / scale... | [
"timothykbook@gmail.com"
] | timothykbook@gmail.com |
df016bf13355458c6083ae6c2005a1cebd3ceecb | 7b6313d1c4e0e8a5bf34fc8ac163ad446bc69354 | /datastructure and algorithms/[hackerrank]The Hurdle Race.py | 5bcab2ab43d0415da1bf267cba2ff15bee29380b | [] | no_license | menuka-maharjan/competitive_programming | c6032ae3ddcbc974e0e62744989a2aefa30864b2 | 22d0cea0f96d8bd6dc4d81b146ba20ea627022dd | refs/heads/master | 2023-05-01T05:23:09.641733 | 2021-05-23T16:22:21 | 2021-05-23T16:22:21 | 332,250,476 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 144 | py | nk=input().split()
n=int(nk[0])
k=int(nk[1])
l=list(map(int,input().rstrip().split()))
x=max(l)
if((x-k)>=0):
print(x-k)
else:
print(0)
| [
"maharjanmenuka8@gmail.com"
] | maharjanmenuka8@gmail.com |
85596fb3ff870c316d4d7b3553f515d5d673f9b9 | 2bb90b620f86d0d49f19f01593e1a4cc3c2e7ba8 | /pardus/tags/2007/desktop/kde/autostart/actions.py | 5bd7b2827ebfb6bdfc4093743e2fb7ed2daacc96 | [] | 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 | 286 | py | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Licensed under the GNU General Public License, version 2.
# See the file http://www.gnu.org/copyleft/gpl.txt.
from pisi.actionsapi import kde
def setup():
kde.configure()
def build():
kde.make()
def install():
kde.install() | [
"yusuf.aydemir@istanbul.com"
] | yusuf.aydemir@istanbul.com |
677993bbfd1033c8a7be8606b387754616bdceda | 853d4cec42071b76a80be38c58ffe0fbf9b9dc34 | /venv/Lib/site-packages/networkx/algorithms/isomorphism/tests/test_tree_isomorphism.py | 3082365a4bb61f2d8c99fcddb56c72e2af1d0aeb | [] | no_license | msainTesting/TwitterAnalysis | 5e1646dbf40badf887a86e125ef30a9edaa622a4 | b1204346508ba3e3922a52380ead5a8f7079726b | refs/heads/main | 2023-08-28T08:29:28.924620 | 2021-11-04T12:36:30 | 2021-11-04T12:36:30 | 424,242,582 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,443 | py | import networkx as nx
import random
import time
from networkx.classes.function import is_directed
from networkx.algorithms.isomorphism.tree_isomorphism import (
rooted_tree_isomorphism,
tree_isomorphism,
)
# have this work for graph
# given two trees (either the directed or undirected)
# transfo... | [
"msaineti@icloud.com"
] | msaineti@icloud.com |
a3c03bb30d7ab9d2444696500ece8c13bfd13edd | 2fabea234735beefc980b77b213fcb0dfb394980 | /tensorflow_probability/python/math/sparse_test.py | aca018215524f5574b3df657c781c4d51d85533d | [
"Apache-2.0"
] | permissive | tarrou/probability | 0eee452b525a6e6b3c7c98d467468e47f07e861b | d4d80a1c04ad0b3e98758ebc3f7f82887274384d | refs/heads/master | 2020-08-08T11:16:42.441268 | 2019-12-06T17:35:17 | 2019-12-06T17:35:17 | 213,819,828 | 0 | 0 | Apache-2.0 | 2019-10-09T04:20:19 | 2019-10-09T04:20:19 | null | UTF-8 | Python | false | false | 6,549 | py | # Copyright 2018 The TensorFlow Probability 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 applicable law o... | [
"gardener@tensorflow.org"
] | gardener@tensorflow.org |
f37f65c77fc2cbe630313fe9779572d9243628eb | 96aa2367affe0dff353e1aaac8713ded087c5f68 | /utils/spiderPlot_SA.py | 335ed09082b623795670281ed3731ae77c81e7d3 | [
"Apache-2.0"
] | permissive | NMTHydro/Recharge | 0fcca9a72b631d6c3834c62b84dfb096da6cb210 | bbc1a05add92064acffeffb19f04e370b99a7918 | refs/heads/develop | 2020-05-21T17:39:37.702622 | 2020-04-08T17:10:40 | 2020-04-08T17:10:40 | 60,631,952 | 8 | 1 | null | 2016-10-26T17:01:21 | 2016-06-07T17:13:30 | Python | UTF-8 | Python | false | false | 5,333 | py | # ===============================================================================
# Copyright 2016 dgketchum
#
# 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/licens... | [
"dgketchum@gmail.com"
] | dgketchum@gmail.com |
516e00001cc17c4e8ab48673154d9f69351bbfe1 | 50948d4cb10dcb1cc9bc0355918478fb2841322a | /azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/task_run_request.py | 2f2ed7a707c8b543f090be7f386215b7b75e10ce | [
"MIT"
] | permissive | xiafu-msft/azure-sdk-for-python | de9cd680b39962702b629a8e94726bb4ab261594 | 4d9560cfd519ee60667f3cc2f5295a58c18625db | refs/heads/master | 2023-08-12T20:36:24.284497 | 2019-05-22T00:55:16 | 2019-05-22T00:55:16 | 187,986,993 | 1 | 0 | MIT | 2020-10-02T01:17:02 | 2019-05-22T07:33:46 | Python | UTF-8 | Python | false | false | 1,824 | py | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | [
"lmazuel@microsoft.com"
] | lmazuel@microsoft.com |
1b5849466318aa075976375e01fa22fddd690edc | 531c47c15b97cbcb263ec86821d7f258c81c0aaf | /sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_08_01/operations/_network_interface_load_balancers_operations.py | e42bd6eccf89e6b11dbf117b8ae8f3bcc1bcf2ca | [
"LicenseRef-scancode-generic-cla",
"LGPL-2.1-or-later",
"MIT"
] | permissive | YijunXieMS/azure-sdk-for-python | be364d3b88204fd3c7d223df23756386ff7a3361 | f779de8e53dbec033f98f976284e6d9491fd60b3 | refs/heads/master | 2021-07-15T18:06:28.748507 | 2020-09-04T15:48:52 | 2020-09-04T15:48:52 | 205,457,088 | 1 | 2 | MIT | 2020-06-16T16:38:15 | 2019-08-30T21:08:55 | Python | UTF-8 | Python | false | false | 5,600 | py | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | [
"noreply@github.com"
] | YijunXieMS.noreply@github.com |
9070f9ba6596fb792ae2d17601a5a9c0581820c3 | fd8405ac0a5d062907c153f2f2e3569571366539 | /irbisbooks/core/urls.py | 17e44ae4a60722f69bb0d5da5d79b7b2b8dec070 | [] | no_license | ri-gilfanov/irbis-books | aab471833035ae51088bccfb0806b863aaba3468 | 0b2a32013ab7f0c0d167e0864a7cb858e8e75add | refs/heads/master | 2021-01-25T13:19:07.818513 | 2018-03-02T09:47:06 | 2018-03-02T09:47:06 | 121,642,933 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 191 | py | from django.urls import path
from . import views
urlpatterns = [
path('', views.book_search, name='book_search'),
path('book_download/', views.book_download, name='book_download'),
] | [
"ri.gilfanov@yandex.ru"
] | ri.gilfanov@yandex.ru |
42d0987e6e1898a0e5f60a297e7db42a013fab6d | bcf332d2f6ef6970cfaa480400a112ecee3f16b8 | /stage07-artist2/s1level42.py | c5f34c2ae0814db387a0d43027c8ee7cd714f9b1 | [
"Unlicense"
] | permissive | skilstak/code-dot-org-python | e1907d29f3727060e5064a5eefd68a0f9f4f5c70 | ba127124386ecfdc20bd84592b3c271f8205d748 | refs/heads/master | 2020-04-04T19:34:23.531210 | 2015-07-10T12:39:19 | 2015-07-10T12:39:19 | 26,862,410 | 7 | 4 | null | 2014-11-21T20:28:20 | 2014-11-19T13:24:30 | Python | UTF-8 | Python | false | false | 465 | py | """Stage 7: Puzzle 8 of 11
Here's the solution to the previous puzzle. Can you add just 2 more
lines of code to complete the drawing?
"""
import sys
sys.path.append('..')
import codestudio
artist = codestudio.load('s1level42')
artist.speed = 'faster'
a = artist
for count2 in range(10):
artist.color = artist.ran... | [
"rob@skilstak.com"
] | rob@skilstak.com |
950b22a78a928e4427896cec1ba0d7c4cac4e011 | 6a4bfff7fcd78a0057401652c7f80d9a95a67267 | /painless_redirects/tests/test_models.py | 2f5b98013047caa595a23ef12657abfbbafe3877 | [
"MIT"
] | permissive | benzkji/django-painless-redirects | 25987ff984830be7e45b4d0af9a9cd0046beabe7 | 153721486b214ddd5365b6ac5769129562254dd5 | refs/heads/master | 2023-05-24T14:23:53.783400 | 2020-06-22T10:35:29 | 2020-06-22T10:35:29 | 22,944,463 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 558 | py | """Tests for the models of the painless_redirects app."""
from django.test import TestCase
from . import factories
class RedirectModelTestCase(TestCase):
def test_model(self):
obj = factories.RedirectFactory()
self.assertTrue(obj.pk)
def test_redirect_value(self):
obj = factories.Re... | [
"bnzk@bnzk.ch"
] | bnzk@bnzk.ch |
9f99434b0414a1ef779501b64fddd6cde711ca08 | 93022749a35320a0c5d6dad4db476b1e1795e318 | /issm/giaivins.py | 8b3e6e1be28e45ec640be9f57bc01bb251bc69f2 | [
"BSD-3-Clause"
] | permissive | pf4d/issm_python | 78cd88e9ef525bc74e040c1484aaf02e46c97a5b | 6bf36016cb0c55aee9bf3f7cf59694cc5ce77091 | refs/heads/master | 2022-01-17T16:20:20.257966 | 2019-07-10T17:46:31 | 2019-07-10T17:46:31 | 105,887,661 | 2 | 3 | null | null | null | null | UTF-8 | Python | false | false | 2,277 | py | from issm.fielddisplay import fielddisplay
from issm.project3d import project3d
from issm.checkfield import checkfield
from issm.WriteData import WriteData
class giaivins(object):
"""
GIA class definition
Usage:
giaivins=giaivins();
"""
def __init__(self): # {{{
self.mantle_viscosity = ... | [
"cummings.evan@gmail.com"
] | cummings.evan@gmail.com |
fa4c4bebb84eeea7871eaf044e4ec0be599f769c | 3d9506b859cdbf38a21549cd3d64b69ecde7674e | /GoogleCodeJam/2020KickstartRoundB/BusRoute.py | b7cceed2c849cd5b217cc8829a02467223137486 | [] | no_license | bradykim7/Algorithm | 1ae4c6e4e6d72687b660ddf0768a9174cc8d7b8c | 053210a1205f4e62b367f85b65dcb60fcad74008 | refs/heads/master | 2022-06-25T04:46:55.265058 | 2022-06-17T08:08:52 | 2022-06-17T08:08:52 | 233,500,101 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 349 | py | import sys;
if __name__=='__main__':
t = int(input());
for i in range(t):
nd = input().split();
n=int(nd[0]); d=int(nd[1]);
ans =d;
x= list(map(int,input().rstrip().split()));
for j in x:
ans -= d % j
print('Case #%d: %d'%(... | [
"bradykim777@gmail.com"
] | bradykim777@gmail.com |
5b98146395ad29c6511925bbc47a3402f1251fa2 | 1e168ced1a4bdb53967021e082b98027aea9d38a | /1.알고리즘정리/정렬/삽입정렬.py | 6e0f94afc79ed7d33b51a468d14c6182e85e3d68 | [] | no_license | vvspearlvvs/CodingTest | 3ebf921308570ac11eb87e6660048ccfcaf90ce4 | fc61b71d955f73ef8710f792d008bc671614ef7a | refs/heads/main | 2023-07-13T15:57:11.312519 | 2021-08-25T02:15:28 | 2021-08-25T02:15:28 | 354,232,513 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 282 | py | #삽입정렬
arr = [7, 5, 9, 0, 3, 1, 6, 2, 4, 8]
for i in range(len(arr)):
for j in range(i,0,-1):
if arr[j]<arr[j-1]: #한칸씩 왼쪽으로 이동
arr[j],arr[j-1]=arr[j-1],arr[j]
else:
break
print(arr)
print("최종")
print(arr)
| [
"gg66477@gmail.com"
] | gg66477@gmail.com |
8b0bcb3eb0687fab864e824994d9b70939870f5d | 5bcee9248d0bdebb134c61b4d0a3f3113337a569 | /lesson_0902/01_lists.py | 816ff09874e0073dca2b2f3d1f0fd9d842bcbb7b | [] | no_license | 100ballovby/6V_Lesson | c2edbc652ea2ebec07eeed60060c16ae4b4792e4 | 4b6dfda323a628558bd63bd5569960004fc335dd | refs/heads/master | 2023-05-08T07:49:14.569854 | 2021-05-25T06:40:53 | 2021-05-25T06:40:53 | 330,888,686 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,044 | py | '''
Список - упорядоченная структура данных, заключенная в квадратные
скобочки. Элементы разделены между собой запятой.
Чтобы создать список, необходимо придумать ему имя, поставить знак принадлежности (=)
и открыть квадратные скобки.
список = [1, 26, 15, 5.6, 'привет, Андрей']
'''
cars = ['audi', 'mercedes', 'toyota'... | [
"greatraksin@icloud.com"
] | greatraksin@icloud.com |
b6683e488f292d0548f63346115c9b555ac19d7a | b7c1e5d140c3c41e86f206047145f7f296fed53a | /Textbook/Chapter 5/pandasSeriesVsDataFrame.py | e8417f1cc0a8b2c5317aff757d4ee250887236df | [
"MIT"
] | permissive | jlcatonjr/Learn-Python-for-Stats-and-Econ | c2fbe29b324e70ceb832beafdd42d0accb37d9f9 | 194671592937562e08c92e0ef5f4793d4911701c | refs/heads/master | 2023-05-11T17:17:05.934290 | 2023-05-10T20:12:10 | 2023-05-10T20:12:10 | 148,912,065 | 22 | 21 | null | null | null | null | UTF-8 | Python | false | false | 300 | py | #pandasSeriesVsDataFrame.py
import numpy as np
import pandas as pd
dataDict = {"range":np.arange(10)}
dataSeries = pd.Series(dataDict)
print(dataSeries)
print(dataSeries["range"])
dataDF=pd.DataFrame(dataDict)
print(dataDF)
print(dataDF["range"])
print(dataDF["range"][5:9])
#print(dataDF.loc[5:9]) | [
"jlcatonjr@gmail.com"
] | jlcatonjr@gmail.com |
7baa26a26fc7ed616e1f4cfa37d283d39e72ebf3 | bbdd7f44884844cd0f7332d63945852dc2b53083 | /mypy_drf_plugin/transformers/fields.py | f4f8a10b2f9cc833f0b0e6cedc3fe13340f2fdf9 | [
"MIT"
] | permissive | private-forks/djangorestframework-stubs | e258e1dfc2af80fdf93322338ea3ce5452087e2d | 18427718c913f3d23ef7a4636c8205df42999cf2 | refs/heads/master | 2020-04-25T09:11:04.067894 | 2019-02-24T22:25:03 | 2019-02-24T22:25:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,241 | py | from mypy.nodes import TypeInfo, Var
from mypy.plugin import FunctionContext
from mypy.types import AnyType, Instance, Type, TypeOfAny
from mypy_django_plugin import helpers
def get_private_descriptor_type(type_info: TypeInfo, private_field_name: str, is_nullable: bool) -> Type:
if not type_info.has_readable_memb... | [
"maxim.kurnikov@gmail.com"
] | maxim.kurnikov@gmail.com |
e02299e147fabe086c8864cff41d59b0059baa48 | 4da0c8906c9cd671e3a4bee3a6ee801a353e3d9a | /Water/Water/urls.py | 8ce00454b8099894f86046e7d4be2dfd650f7cf9 | [] | no_license | avpakh/GVK | 2a5a699caa8a986a3fd0dadbe2160fc9da5bf193 | ac8b8d8ad5cd5ef8485e98cd532a29cd420e0cae | refs/heads/master | 2020-06-13T10:35:36.663668 | 2017-01-06T09:01:42 | 2017-01-06T09:01:42 | 75,392,559 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,335 | py | """Water URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.9/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-based... | [
"aliaksandr.pakhomau@gmail.com"
] | aliaksandr.pakhomau@gmail.com |
64acd726fc80f2bd6451b0e36ae4cde1f625e944 | 8c2de4da068ba3ed3ce1adf0a113877385b7783c | /hyperion/torch/trainers/xvector_trainer.py | 190b2a30b1c2f28d38d0c6999040ce4ae6a76f9f | [
"Apache-2.0"
] | permissive | hyperion-ml/hyperion | a024c718c4552ba3a03aae2c2ca1b8674eaebc76 | c4c9eee0acab1ba572843373245da12d00dfffaa | refs/heads/master | 2023-08-28T22:28:37.624139 | 2022-03-25T16:28:08 | 2022-03-25T16:28:08 | 175,275,679 | 55 | 20 | Apache-2.0 | 2023-09-13T15:35:46 | 2019-03-12T18:40:19 | Python | UTF-8 | Python | false | false | 5,015 | py | """
Copyright 2019 Johns Hopkins University (Author: Jesus Villalba)
Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
"""
import os
from collections import OrderedDict as ODict
import logging
import torch
import torch.nn as nn
from ..utils import MetricAcc
from .torch_trainer import TorchTrainer
class X... | [
"jesus.antonio.villalba@gmail.com"
] | jesus.antonio.villalba@gmail.com |
f352ec7987f6f9addb4cc8a333cc19463e602697 | 5332fef91e044555e605bb37cbef7c4afeaaadb0 | /hy-data-analysis-with-python-2020/part02-e06_file_count/test/test_file_count.py | c7d3f00f44cd8f760c403784983ad6ec08d26a70 | [] | no_license | nopomi/hy-data-analysis-python-2019 | f3baa96bbe9b6ee7f0b3e6f6b8b0f3adfc3b6cc8 | 464685cb377cfdeee890a008fbfbd9ed6e3bcfd0 | refs/heads/master | 2021-07-10T16:16:56.592448 | 2020-08-16T18:27:38 | 2020-08-16T18:27:38 | 185,044,621 | 4 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,560 | py | #!/usr/bin/env python3
import sys
import unittest
from unittest.mock import patch
from itertools import repeat
from tmc import points
from tmc.utils import load, get_out
module_name="src.file_count"
file_count = load(module_name, "file_count")
main = load(module_name, "main")
class FileCount(unittest.TestCase):
... | [
"miska.noponen@gmail.com"
] | miska.noponen@gmail.com |
0340fad6844580f9a0ff3797769971efcc2f644a | 52a4d869976a97498bdf56a8d0ff92cac138a136 | /Bioinformatics Textbook Track/Chapter 1/rosalind_ba1d.py | 4e6d4b0953bb2d76fa147c0368a4f8c3ded360aa | [] | no_license | aakibinesar/Rosalind | d726369a787d848cc378976b886189978a60a3a5 | 375bbdbfb16bf11b2f980701bbd0ba74a1605cdb | refs/heads/master | 2022-08-18T09:36:00.941080 | 2020-05-24T18:49:38 | 2020-05-24T18:49:38 | 264,722,651 | 0 | 0 | null | 2020-05-17T17:51:03 | 2020-05-17T17:40:59 | null | UTF-8 | Python | false | false | 747 | py | def occurrences(genome, sub):
"""
:param genome: genome for processing
:param sub: pattern for which we find indexes of occurnces
:return: list of indexes
"""
start = 0
indexes = []
while True:
start = genome.find(sub, start)
if start > 0:
indexes.append(start... | [
"noreply@github.com"
] | aakibinesar.noreply@github.com |
f1c755702c61d3a4c3f5e88391da6a3096250b2f | 5399dd4580ea3f528753bc8b52a981743d62f8bb | /keras/keras36_hist3_wine.py | 6844fef8e2c4a5ad39b62167985de24abdf45314 | [] | no_license | iwillbeaprogramer/Study | 3ac7c118ffe3981d78b4ad263cb62432eae13970 | 3bfe571da5bbfc545b994e5878e217f9306bde14 | refs/heads/main | 2023-05-07T16:31:05.564973 | 2021-05-27T14:50:00 | 2021-05-27T14:50:00 | 324,044,441 | 8 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,733 | py | from sklearn.datasets import load_wine
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import MinMaxScaler,OneHotEncoder
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Dense
from tensorflow.keras.callbacks import EarlyStopping
import matplotlib.pyplot ... | [
"wisixicidi@gmail.com"
] | wisixicidi@gmail.com |
01ed2276aaa8ccf051e68654900f77f99150ae15 | 4de03eecadc4c69caf792f4773571c2f6dbe9d68 | /tests/seahub/share/views/test_send_shared_link.py | c265c943065929d26d603cb4f387bfa7dd71b7aa | [
"Apache-2.0"
] | permissive | Tr-1234/seahub | c1663dfd12f7584f24c160bcf2a83afdbe63a9e2 | ed255e0566de054b5570218cb39cc320e99ffa44 | refs/heads/master | 2022-12-23T16:20:13.138757 | 2020-10-01T04:13:42 | 2020-10-01T04:13:42 | 300,138,290 | 0 | 0 | Apache-2.0 | 2020-10-01T04:11:41 | 2020-10-01T04:11:40 | null | UTF-8 | Python | false | false | 3,204 | py | from mock import patch
from django.core import mail
from django.core.urlresolvers import reverse
from django.test import override_settings
from seahub.profile.models import Profile
from seahub.profile.utils import refresh_cache
from seahub.test_utils import BaseTestCase
class SendSharedLinkTest(BaseTestCase):
de... | [
"colinsippl@gmx.de"
] | colinsippl@gmx.de |
775b26f16fa53c27ec712bf92cfb31553c92f19d | e24511af0fdf299130fdf1e27b7eda1e35064e7c | /app/coupon/apps.py | bab96066b77b4592b0cf454c6ef51fa085d53a67 | [] | no_license | amitbhalla/lms | 623dc6764dba5ee67a7f30d3882b7917b6441c2e | 0810a875008b371a7bd3996742ad3b04ce037b14 | refs/heads/main | 2023-07-19T12:12:40.570958 | 2021-09-17T16:55:29 | 2021-09-17T16:55:29 | 405,055,595 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 144 | py | from django.apps import AppConfig
class CouponConfig(AppConfig):
default_auto_field = "django.db.models.BigAutoField"
name = "coupon"
| [
"amit9815@gmail.com"
] | amit9815@gmail.com |
84340a119e8fdb72320174077f9aa1c0605ca64f | 9d566e153a254390ed758f4e945781899b6dcd07 | /03_django/02_django_crud/articles/views.py | e9c78e872870c579df912051bc9513f1f01afb88 | [] | no_license | baambox5/TIL | 6f1b0fdc342ed29b85a68404b916fc6f4cace7bf | 0419779ccbf506a1e89d581b98658dd07b78388c | refs/heads/master | 2023-01-13T01:14:08.125234 | 2020-01-17T14:36:34 | 2020-01-17T14:36:34 | 195,918,108 | 0 | 0 | null | 2023-01-07T11:27:08 | 2019-07-09T02:31:02 | Jupyter Notebook | UTF-8 | Python | false | false | 2,964 | py | from IPython import embed
from django.core.exceptions import ValidationError
from django.shortcuts import render, redirect
from .models import Article, Comment
# Create your views here.
def index(request):
# articles = Article.objects.all()
articles = Article.objects.order_by('-pk') # DB가 변경(가능한 권장)
# ... | [
"baamboxo@gmail.com"
] | baamboxo@gmail.com |
a3cf7cefbf7e8537e0c1fe7a704c4158e33f881b | 39e03684081b27311385a0ab31afcc2e09883e5c | /configs/reppoints/bbox_r50_grid_center_fpn_1x.py | f971b5b7b8c78a6abca727e7015b96d085b5f33b | [
"MIT",
"Python-2.0"
] | permissive | witnessai/MMSceneGraph | 8d0b2011a946ddcced95fbe15445b7f4da818509 | bc5e0f3385205404c712ae9f702a61a3191da0a1 | refs/heads/master | 2023-08-12T06:54:00.551237 | 2021-10-12T03:04:21 | 2021-10-12T03:04:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,462 | py | # model settings
norm_cfg = dict(type='GN', num_groups=32, requires_grad=True)
model = dict(
type='RepPointsDetector',
pretrained='torchvision://resnet50',
backbone=dict(
type='ResNet',
depth=50,
num_stages=4,
out_indices=(0, 1, 2, 3),
frozen_stages=1,
... | [
"23736866+Kenneth-Wong@users.noreply.github.com"
] | 23736866+Kenneth-Wong@users.noreply.github.com |
0187aa1b8fa9854b1f253d952bda031992f4b423 | 20a3cc1106fa86fc2d45cd1728cc87d5db97e1f7 | /old/pddbm/bug3.py | 7d0a81d444b74c37e2e621dc7a08f50608b54c18 | [] | no_license | sarahboufelja54/galatea | f5664f0b3117629b2c5bbe078a1bd52bb5e359e6 | 002a9f2905868be25b71770190fb2d5eda11c861 | refs/heads/master | 2020-12-04T13:45:07.697189 | 2018-12-12T16:27:09 | 2018-12-12T16:27:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,268 | py | import numpy as np
from sklearn.svm import SVC
import time
rng = np.random.RandomState([1,2,3])
m = 1000
n = 1000
X = rng.randn(m,n)
w = rng.randn(n)
b = rng.randn(1)
y = (np.dot(X,w) + b ) > 0
t1 = time.time()
svm = SVC(kernel = 'linear', C = 1.0).fit(X,y)
t2 = time.time()
print 'train time ',t2 - t1
t1 = time.t... | [
"goodfellow.ian@gmail.com"
] | goodfellow.ian@gmail.com |
244651275300889c2f7a9b4928af9c1940ad6614 | 4be9a5bdb8e051001b78c8f127ccc1a7f85c14e7 | /bugzilla/migrations/0002_auto_20170205_1515.py | 6b518a7b30a1bea8b1cda0d937046f6fe0febbe5 | [] | no_license | quentin-david/heimdall | f72a85606e7ab53683df2023ef5eaba762198211 | 84a429ee52e1891bc2ee4eb07a084dff209c789c | refs/heads/master | 2021-01-21T10:26:28.895663 | 2017-07-21T19:19:46 | 2017-07-21T19:19:46 | 83,432,596 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 638 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2017-02-05 15:15
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('bugzilla', '0001_initial'),
]
operations = [
migrations.AlterModelOptions(
... | [
"david@hemdgsa01.local.lan"
] | david@hemdgsa01.local.lan |
7b0c4083d029a92441704bd296c1aef0ebbf84f2 | 2d4ab8e3ea9fd613ec0ae0c1956b68874c9b5f06 | /tests/pipelines/cnv_calling/test_xhmm_pca.py | e9dc13feb4ca41c6220481e9e7105e1e72bce443 | [] | no_license | biocodices/paip | 4abd39cbbd372a68592da87177c70c403d5a661d | 040a62c11e5bae306e2de4cc3e0a78772ee580b3 | refs/heads/master | 2021-01-17T20:48:28.642255 | 2019-07-26T14:30:58 | 2019-07-26T14:30:58 | 62,604,413 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,013 | py | from unittest.mock import MagicMock
import pytest
from paip.pipelines.cnv_calling.xhmm_pca import XhmmPCA, EmptyInputMatrix
@pytest.fixture
def task(cohort_task_factory):
return cohort_task_factory(XhmmPCA)
def test_check_matrix(task):
# NOTE: Run this test before the next one, because the tested method
... | [
"juanmaberros@gmail.com"
] | juanmaberros@gmail.com |
7df75a268c13f4de545db13ec51df02cd9cdbda5 | ddcc89dc88961f37d50c0f9d893f265bf34afdb3 | /test/test_simple_module_pass.py | f6be33ae365cbfb62819b6d08a8740fcd1ff5120 | [
"Unlicense",
"LicenseRef-scancode-unknown-license-reference",
"NCSA",
"LicenseRef-scancode-public-domain"
] | permissive | mulle-nat/property-syntax-modernizer | f351319314a0216e5e241fa03f9d95a3764a6590 | 93445534221840d0df6cfb2d2f4ceb73f37ac962 | refs/heads/master | 2020-08-07T08:57:02.149734 | 2019-10-07T12:46:11 | 2019-10-07T12:46:11 | 213,381,270 | 0 | 0 | Unlicense | 2019-10-07T13:11:51 | 2019-10-07T12:47:05 | C++ | UTF-8 | Python | false | false | 442 | py | import sys, unittest
from tools import SamplesTestCase
OUTPUT_FOR_GLOBALS = '''\
Found global named "gfloat": type = float*
Found global named "gppfloat": type = float***
Found global named "gint": type = i32*
'''
PROG = 'simple_module_pass'
class TestSimpleModulePass(SamplesTestCase):
def test_on_globals(self)... | [
"eliben@gmail.com"
] | eliben@gmail.com |
015c735e062ac63dde157d1b06e700b8009e14ce | 8a1241ac8ad91672aec81c878f2165a7678a1ad6 | /Web/Applications/Visualizer/server/pv_web_visualizer.py | 84ef98ae22d8c269ffca4d47cdd4e0a31d3dd2f0 | [
"MIT",
"LicenseRef-scancode-paraview-1.2",
"Apache-2.0",
"LicenseRef-scancode-protobuf",
"BSD-3-Clause"
] | permissive | lmynsberge/ParaView | d9fbd0f4da197bc96172be8697ced76fe73852bf | 2a68ee496949becf499742dfdbecb41b1eda81a7 | refs/heads/master | 2021-01-22T16:18:25.241194 | 2013-11-11T15:01:02 | 2013-11-11T15:01:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,203 | py | r"""
This module is a ParaViewWeb server application.
The following command line illustrate how to use it::
$ pvpython .../pv_web_visualizer.py --data-dir /.../path-to-your-data-directory
--data-dir is used to list that directory on the server and let the client choose a file to load.
... | [
"sebastien.jourdain@kitware.com"
] | sebastien.jourdain@kitware.com |
aa80166792010844c80020d87de369afec96d42a | 5eff9df4d276e83c68ce843d58868499858f701a | /Leetcode - FB/p0350.py | 3780986eb5c2d856d4e29deeeacac48b9f10fdf7 | [] | no_license | arunraman/Code-Katas | b6723deb00caed58f0c9a1cafdbe807e39e96961 | 7fe3582fa6acf59a2620fe73e1e14bd8635bbee8 | refs/heads/master | 2023-03-04T17:27:44.037145 | 2023-03-02T21:09:53 | 2023-03-02T21:09:53 | 25,232,784 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 456 | py | class p0349(object):
def intersectiontwoArrays(self, nums1, nums2):
dict1 = dict()
for i in nums1:
if i not in dict1:
dict1[i] = 1
else:
dict1[i] += 1
ret = []
for i in nums2:
if i in dict1 and dict1[i] > 0:
... | [
"arunraman.19@gmail.com"
] | arunraman.19@gmail.com |
205e2c6f3f8e1f3fd358d21e4ccbb1da32701a93 | 021a3dff055d4b3e40aafc63f0029dc280466233 | /db_scripts/curw_fcst/rfield/gen_rfield_kelani_basin_parallelized_optimized.py | e2bed1eb35b657a3592bea9d212fe72a3c8b6482 | [] | no_license | shadhini/curw_helpers | 45efe90d887c702b3a3f5877163647e220d230e4 | 101d896f8b589b478ef146b5b4dd99ec24f2dc84 | refs/heads/master | 2021-07-03T02:53:13.398052 | 2020-10-28T03:39:58 | 2020-10-28T03:39:58 | 185,217,580 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,854 | py | #!/home/uwcc-admin/curw_rfield_extractor/venv/bin/python3
import traceback
import pymysql
import json
import getopt
import sys
import os
import re
import multiprocessing as mp
from datetime import datetime, timedelta
# connection params
HOST = ""
USER = ""
PASSWORD = ""
DB =""
PORT = ""
VALID_MODELS = ["WRF_A", "WRF_... | [
"jshadhiniaseka@gmail.com"
] | jshadhiniaseka@gmail.com |
d1f9c5d8fe6a52dd2e130204f45e94850dfa5e0f | 33f86c1678d2f5e15da77885e0bf770f405201a4 | /tcamp/local_settings.example.py | b5b48f86971536c25ec25d5c61d13c2805a1304e | [
"BSD-3-Clause"
] | permissive | imclab/tcamp | 5410c9549ed7731575e7312acfed7b8e4cd0c58d | 111cabab90b2c8cf651ee480520bc43a33f30844 | refs/heads/master | 2021-01-18T12:15:58.484183 | 2014-03-05T21:36:00 | 2014-03-05T21:36:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,832 | py | DEBUG = True
ADMINS = (
('', ''),
)
MANAGERS = ADMINS
INTERNAL_IPS = ('127.0.0.1', )
SECRET_KEY = ''
DATABASES = {
'local': {
'ENGINE': '', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'NAME': '', # Or path to database file if using sqlite3.
'USER': ... | [
"dan.drinkard@gmail.com"
] | dan.drinkard@gmail.com |
af0ff074d35191259400a9937db81997e7772ffd | d52cb4c2e880875944b14da0b8a9542235942ac8 | /geeksforgeeks/heap/6_Find_median_in_stream.py | 521a8f79468f59a0c175f5766c7681ae8d0a619c | [] | no_license | saparia-data/data_structure | fbd61535b68f92143b2cb2679377c0f56f424670 | 2e8700cfdaeefe0093e5b4fb2704b1abcd300d02 | refs/heads/master | 2023-05-08T18:54:52.250941 | 2021-06-04T05:44:29 | 2021-06-04T05:44:29 | 296,071,146 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,382 | py | '''
Given an input stream of N integers.
The task is to insert these numbers into a new stream and find the median of the stream formed by each insertion of X to the new stream.
Example 1:
Input:
N = 4
X[] = 5,15,1,3
Output:
5
10
5
4
Explanation:Flow in stream : 5, 15, 1, 3
5 goes to stream --> median 5 (5)
15 goe... | [
"saparia.ashvin@tavant.com"
] | saparia.ashvin@tavant.com |
a15aa9381f0639460207512eace0c0e66ea54b4b | d554b1aa8b70fddf81da8988b4aaa43788fede88 | /5 - Notebooks e Data/1 - Análises numéricas/Arquivos David/Atualizados/logDicas-master/data/2019-1/222/users/4327/codes/1602_2049.py | 1ce019700e7801903c6df341e812f94f4b2cb946 | [] | no_license | JosephLevinthal/Research-projects | a3bc3ca3b09faad16f5cce5949a2279cf14742ba | 60d5fd6eb864a5181f4321e7a992812f3c2139f9 | refs/heads/master | 2022-07-31T06:43:02.686109 | 2020-05-23T00:24:26 | 2020-05-23T00:24:26 | 266,199,309 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 302 | py | # Teste seu codigo aos poucos.
# Nao teste tudo no final, pois fica mais dificil de identificar erros.
# Nao se intimide com as mensagens de erro. Elas ajudam a corrigir seu codigo.
x=int(input("informe o dividendo: " ))
y=int(input("informe o divisor: " ))
print (x)
print (y)
print (x//y)
print (x%y) | [
"jvlo@icomp.ufam.edu.br"
] | jvlo@icomp.ufam.edu.br |
eaa1694453e2fb1d8f4e20c3a6a0852dc8c2f92c | bec66ec0c920939547466b2b8f9d65813d560d1d | /noxious/__init__.py | f007d1198e0435f72d773eb479f29a48d9534092 | [] | no_license | mbr/noxious | cbb3be2ca725a0282db390520306da7ebba75339 | 6c48fe84867d80614defa6bdce4d4640ce657ae5 | refs/heads/master | 2023-06-06T20:42:08.079423 | 2015-08-30T10:54:52 | 2015-08-30T10:54:52 | 41,625,389 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,557 | py | import xml.etree.ElementTree as ET
def from_file(fn):
tree = ET.parse(fn)
return Noxious(tree.getroot())
class Noxious(object):
def __init__(self, elem, parent=None):
self._parent = parent
self._elem = elem
def _all(self):
return [self.__class__(sibling)
for ... | [
"git@marcbrinkmann.de"
] | git@marcbrinkmann.de |
4b2654ba6bffd9e20cf44a960e8ed5166476ba81 | 749aca95edfaad9e7d8b84dc2c6f62038595efc3 | /mandala.py | dac1d0eae959c6a652cc1f391088ca60e9419b56 | [] | no_license | xmduhan/mandala | efe72b116ec829457cd2286b88b4544d5538861c | eafea6c9ebd0ca913c070f0bf2cbf72a6566b0a7 | refs/heads/master | 2021-06-30T16:30:49.410637 | 2017-09-20T09:44:53 | 2017-09-20T09:44:53 | 104,153,412 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,494 | py | #!/usr/bin/env python
# encoding: utf-8
import dataset
from pyfiglet import Figlet
from termcolor import cprint
from prompt_toolkit import prompt as _prompt
from prompt_toolkit.history import InMemoryHistory
from itertools import count
from treelib import Tree
from pandas import DataFrame
history = InMemoryHistory()
d... | [
"xmduhan@gmail.com"
] | xmduhan@gmail.com |
35da38996a54cfbccf733b5859960068514b4714 | 163bbb4e0920dedd5941e3edfb2d8706ba75627d | /Code/CodeRecords/2332/60592/271480.py | f602a8c01f31dbba291aa53971306002fff48fef | [] | 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 | 630 | py | base = int(input())
tar = int(input())
res = 0
fun = []
te = 0
tem = tar
while tem != 0:
i = 0
if tem == 1:
te += 1
break
mark = 0
while mark <= tem:
mark = pow(base,i)
i+=1
te+=i-3
mark/=base
tem-=mark
if tem!= 0:
te+=1
fun.append(te)
te = 0
tem =... | [
"1069583789@qq.com"
] | 1069583789@qq.com |
516a6530d09f3f2717a8b0cf0e85c849bb9f4ad0 | f63907d2115becd64704ef1881f3bfcb7ba9047d | /sandbox/test/testTemplate.py | 91ba4b483092ee7a004dca1be860007bfd13cdaa | [] | no_license | AseiSugiyama/NZMATH-Python3 | d456610f72071a654531583228e439ffa8a4db0c | f65b176be2e58fafa0eea91f399c9ab17f3f478b | refs/heads/master | 2020-05-21T07:26:51.434191 | 2019-04-27T09:52:18 | 2019-04-27T09:52:18 | 185,959,644 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 989 | py | import unittest
import sandbox.hoge as hoge
class HogeTest (unittest.TestCase):
"""
Test classes must inherite unittest.TestCase.
They have name suffixed with 'Test'.
"""
def setUp(self):
"""
setUp is run before each test method run.
"""
pass
def tearDown(self):
"""
... | [
"devnull@localhost"
] | devnull@localhost |
2b900473f8ebad3774236008a4ce12609bd077c4 | c4af67db4c523d20f2d55aef90ba77db1fb53c38 | /validation/tests/test_validation.py | c1128b9d609b6db323abf0d49d809d2207be7177 | [] | no_license | dtgit/dtedu | e59b16612d7d9ea064026bf80a44657082ef45a3 | d787885fe7ed0de6f9e40e9b05d852a0e9d60677 | refs/heads/master | 2020-04-06T05:22:50.025074 | 2009-04-08T20:13:20 | 2009-04-08T20:13:20 | 171,351 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,060 | py |
from Testing import ZopeTestCase
from Products.Archetypes.tests.atsitetestcase import ATSiteTestCase
from Testing.ZopeTestCase import doctest
from Products.validation import validation
class TestValidation(ATSiteTestCase):
def test_inNumericRange(self):
v = validation.validatorFor('inNumericRange')
... | [
"ron@domU-12-31-39-02-65-03.compute-1.internal"
] | ron@domU-12-31-39-02-65-03.compute-1.internal |
edd7334352747e1e9b08be0af986b1239e3ee6fe | 5a25edcf994a760688dc7c933e8071bf4ff24df3 | /exercises/ja/solution_01_08_01.py | 01762ddd77ee431a33af88413c4449ddfc5b02bc | [
"CC-BY-NC-4.0",
"MIT"
] | permissive | heyMP/spacy-course | 8762990ed6179011680730d9c24d5d34c0a8d954 | 3740c717f0d1090b01c1b0fe23f8e30af3bf0101 | refs/heads/master | 2022-11-07T21:52:15.479840 | 2020-06-25T18:13:44 | 2020-06-25T18:13:44 | 275,202,487 | 1 | 0 | MIT | 2020-06-26T16:39:32 | 2020-06-26T16:39:31 | null | UTF-8 | Python | false | false | 476 | py | import spacy
nlp = spacy.load("en_core_web_sm")
text = "It’s official: Apple is the first U.S. public company to reach a $1 trillion market value"
# テキストを処理
doc = nlp(text)
for token in doc:
# トークンの文字列、品詞タグ、依存関係ラベルを取得
token_text = token.text
token_pos = token.pos_
token_dep = token.dep_
# フォーマット... | [
"tamuhey@gmail.com"
] | tamuhey@gmail.com |
2f7b555b8a023acfc59b3616b78949d6bc53ab5f | 3349a0d44da04fd9fae7728ce1315ccf0c82285e | /556A - case of zeroes and ones.py | c96ebf9ebc0e1aad3e01b362c37be5bd17da4cdb | [] | no_license | umairnsr87/Data_Structures_Python | 959848e546fd4f98959bc14470c26ce91bfb5c9c | 05b5803521ed2ec7f64d95f08e2f014471dfdfd4 | refs/heads/master | 2023-07-18T12:11:55.245699 | 2023-07-16T17:01:09 | 2023-07-16T17:01:09 | 294,360,086 | 0 | 0 | null | 2023-07-16T17:01:10 | 2020-09-10T09:11:11 | Python | UTF-8 | Python | false | false | 567 | py | from collections import Counter
test = int(input())
strings = input()
# time complexity:O(n)
# while '01' or '10' in strings:
# if '01' in strings:
# strings = strings.replace('01', '')
# elif '10' in strings:
# strings = strings.replace('10', '')
# else:
# break
#
# print(len(str... | [
"umairnsr87@gmail.com"
] | umairnsr87@gmail.com |
e607164ee72ed5d0071b455388700dbe366a225e | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/otherforms/_windlasses.py | 6ee113296ad40900fcef0fed2db7fb643eaa9caf | [
"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 | 232 | py |
#calss header
class _WINDLASSES():
def __init__(self,):
self.name = "WINDLASSES"
self.definitions = windlass
self.parents = []
self.childen = []
self.properties = []
self.jsondata = {}
self.basic = ['windlass']
| [
"xingwang1991@gmail.com"
] | xingwang1991@gmail.com |
8c8e0126b4969636ebe2d414567e598beb70bf2c | e9a9955da9bee9be6580f1b1a75f97a1f99d0289 | /login/migrations/0016_auto_20190803_1452.py | eb4f2ea18f1fff82b8ba290db60a29457a52f715 | [] | no_license | Manjunatha1997/project_IT | bdb36142256b9d4eb1b75a76994d801dd3c33013 | fe58a30d033d4f4ed818c0282a802fafcf3aaff5 | refs/heads/master | 2021-02-28T04:17:13.872903 | 2020-03-07T15:48:49 | 2020-03-07T15:48:49 | 245,661,299 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 637 | py | # Generated by Django 2.1.7 on 2019-08-03 14:52
import datetime
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('login', '0015_auto_20190803_0435'),
]
operations = [
migrations.AlterField(
model_name='profile',
na... | [
"lovelymanju198@gmail.com"
] | lovelymanju198@gmail.com |
f17669184ef2e9e58cc9613ffd6e8add89126ea3 | 09e8c92187ff8d7a726727041e2dd80850dcce3d | /leetcode/028_implement_strStr_TRICKY.py | 7154dcc9281455ccd29a545cb11042da6c8c43ad | [] | no_license | kakru/puzzles | 6dd72bd0585f526e75d026f3ba2446b0c14f60e0 | b91bdf0e68605f7e517446f8a00b1e0f1897c24d | refs/heads/master | 2020-04-09T09:47:31.341475 | 2019-05-03T21:24:41 | 2019-05-03T21:24:41 | 160,246,660 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,846 | py | #/usr/bin/env python3
import unittest
class Solution:
def strStr(self, haystack, needle):
"""
:type haystack: str
:type needle: str
:rtype: int
"""
h_len = len(haystack)
n_len = len(needle)
i = 0
while i <= h_len - n_len:
if haysta... | [
"karol@kruzelecki.com"
] | karol@kruzelecki.com |
ea641622136b336a1f7196b18e51f101df6df097 | d45bb44b0dfabfeff37c21a6ac0be1362782e39a | /utils/import_bookmarks.py | ea763b006243bdea76577f71ce07e8fba1168997 | [] | no_license | SyJarvis/BookmarkManager | c25f9df8cb0d0719de805f8080a7ae78c5ac529c | dc3baf06fd47c4514b148134ee3d3fa03f7f1571 | refs/heads/master | 2023-03-26T17:14:17.776441 | 2021-03-21T14:58:58 | 2021-03-21T14:58:58 | 322,634,112 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 647 | py | from pyquery import PyQuery as pq
class BookmarksTodb():
def __init__(self, filename='utils/bookmarks_2020_5_5_win.html'):
with open(filename, 'r+', encoding='utf-8') as file:
self.html = file.read()
self.doc = pq(self.html)
def get_cage_list(self):
cage_li = []
items = self.doc('H3')
for... | [
"1755115828@qq.com"
] | 1755115828@qq.com |
44f7d5e6d9055b7acb7c3147d5e6aa735fc3ce3e | a09e70355b756bd5cba55246e17eb0480af6257b | /examples/ble_demo_central.py | eb56a9cb9b54270e50eb0709aed3104e43dfecc4 | [
"MIT"
] | permissive | devoh747/Adafruit_CircuitPython_BLE | 9735381dc3481661af54ac32d89ec40e006edc5b | 7566483e2dbdb1bf6c71d5629a2ed37b113c7cff | refs/heads/master | 2020-08-09T04:14:59.774817 | 2019-10-10T21:11:07 | 2019-10-10T21:11:07 | 213,995,226 | 0 | 0 | MIT | 2019-10-09T18:33:32 | 2019-10-09T18:33:32 | null | UTF-8 | Python | false | false | 1,319 | py | """
Demonstration of a Bluefruit BLE Central. Connects to the first BLE UART peripheral it finds.
Sends Bluefruit ColorPackets, read from three potentiometers, to the peripheral.
"""
import time
import board
from analogio import AnalogIn
#from adafruit_bluefruit_connect.packet import Packet
# Only the packet classes... | [
"halbert@halwitz.org"
] | halbert@halwitz.org |
26abf2b58ee4ed7a69f2c069c5026e46fd6d5427 | 419873dd3b7412f704b1a7907b64a60b44cedf39 | /python/树/103. 二叉树的锯齿形层次遍历.py | b3b9739640c5bbaeecf8e7c3f913e970275761a9 | [] | no_license | Weless/leetcode | 0585c5bfa260713f44dabc51fa58ebf8a10e7814 | 0566622daa5849f7deb0cfdc6de2282fb3127f4c | refs/heads/master | 2021-11-13T07:59:20.299920 | 2021-10-25T02:09:53 | 2021-10-25T02:09:53 | 203,720,668 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 818 | py | class TreeNode:
def __init__(self, x):
self.val = x
self.left = None
self.right = None
from typing import List
class Solution:
def zigzagLevelOrder(self, root: TreeNode) -> List[List[int]]:
if not root:
return []
from collections import deque
queue = d... | [
"twzcxx1@163.com"
] | twzcxx1@163.com |
9fde6b1cc14c9a979633c4f2df97f24dca4d78bb | 84290c584128de3e872e66dc99b5b407a7a4612f | /Supervised Learning with scikit-learn/Preprocessing and pipelines/Centering and scaling.py | c21eb26fe58bf9a8d53c990a24d3b0ab871dee0b | [] | no_license | BautizarCodigo/DataAnalyticEssentials | 91eddc56dd1b457e9e3e1e3db5fbbb2a85d3b789 | 7f5f3d8936dd4945ee0fd854ef17f04a04eb7b57 | refs/heads/main | 2023-04-11T04:42:17.977491 | 2021-03-21T19:05:17 | 2021-03-21T19:05:17 | 349,784,608 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 504 | py | # Import scale
from sklearn.preprocessing import scale
# Scale the features: X_scaled
X_scaled = scale(X)
# Print the mean and standard deviation of the unscaled features
print("Mean of Unscaled Features: {}".format(np.mean(X)))
print("Standard Deviation of Unscaled Features: {}".format(np.std(X)))
# Print the mean ... | [
"78171986+BautizarCodigo@users.noreply.github.com"
] | 78171986+BautizarCodigo@users.noreply.github.com |
a8ba14a006fb88ac5415201cfab9678983738d9d | b47f2e3f3298388b1bcab3213bef42682985135e | /experiments/fdtd-2d/tmp_files/2238.py | 6dfcdd1cd9629a3c959c2e3b61310de6617d05bf | [
"BSD-2-Clause"
] | permissive | LoopTilingBenchmark/benchmark | 29cc9f845d323431e3d40e878cbfc6d1aad1f260 | 52a3d2e70216552a498fd91de02a2fa9cb62122c | refs/heads/master | 2020-09-25T09:45:31.299046 | 2019-12-04T23:25:06 | 2019-12-04T23:25:06 | 225,975,074 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 411 | py | from chill import *
source('/uufs/chpc.utah.edu/common/home/u1142914/lib/ytopt_vinu/polybench/polybench-code/stencils/fdtd-2d/kernel.c')
destination('/uufs/chpc.utah.edu/common/home/u1142914/lib/ytopt_vinu/experiments/fdtd-2d/tmp_files/2238.c')
procedure('kernel_fdtd_2d')
loop(0)
known(' nx > 1 ')
known(' ny > 1 ')
ti... | [
"nashenruoyang@163.com"
] | nashenruoyang@163.com |
bd6651931aed58d7bfd2c1949c7dea3b99edfd6c | b685036280331fa50fcd87f269521342ec1b437b | /src/data_mining_demo/py_shuJuWaJue_ruMen_yu_ShiJian/chapter3/demo2.py | 7e2ee679470b22f9af507b2f12f77a6431309659 | [] | no_license | chenqing666/myML_DM_Test | f875cb5b2a92e81bc3de2a0070c0185b7eacac89 | 5ac38f7872d94ca7cedd4f5057bb93732b5edbad | refs/heads/master | 2022-02-26T01:52:06.293025 | 2019-09-20T06:35:25 | 2019-09-20T06:35:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 175 | py | import pickle
import numpy as np
import pandas as pd
datafile = "./cleanedData.dai"
with open(datafile, 'rb') as file:
dataset = pickle.load(file)
print(dataset.head()) | [
"daijitao@ctsi.com.cn"
] | daijitao@ctsi.com.cn |
71b2e819f9b87e7fec810e93dc2fb3d1006ac89d | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/nouns/_combos.py | cac18802b80f0f4ecc83aabd2e7d23ba1ed8481a | [
"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 | 231 | py |
from xai.brain.wordbase.nouns._combo import _COMBO
#calss header
class _COMBOS(_COMBO, ):
def __init__(self,):
_COMBO.__init__(self)
self.name = "COMBOS"
self.specie = 'nouns'
self.basic = "combo"
self.jsondata = {}
| [
"xingwang1991@gmail.com"
] | xingwang1991@gmail.com |
82812f0cb1ad89fee4e2c4ad453429f5b4e8cc8f | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_118/619.py | 85060cf54efea0ef148ad0160403ca71cbb9b978 | [] | 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 | 596 | py | # -*- coding: utf-8 -*-
import sys
def is_palindrome(num):
s1 = str(num)
s2 = s1[::-1]
return s1 == s2
fair_numbers = []
for i in range(pow(10, 7)+1):
if is_palindrome(i):
num = i*i
if is_palindrome(num):
fair_numbers.append(num)
N = int(sys.stdin.readline())
for T in ran... | [
"miliar1732@gmail.com"
] | miliar1732@gmail.com |
c0056aa85383d670add5f74e627672b310c662ce | a867b1c9da10a93136550c767c45e0d8c98f5675 | /G_LC_1055_ShortestWaytoFormString.py | 057fd0b488c0696e709603ccc3d5993c1b5d2c98 | [] | no_license | Omkar02/FAANG | f747aacc938bf747129b8ff35b6648fb265d95b6 | ee9b245aa83ea58aa67954ab96442561dbe68d06 | refs/heads/master | 2023-03-25T19:45:08.153403 | 2021-03-28T07:13:08 | 2021-03-28T07:13:08 | 280,783,785 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 835 | py | # import __main__ as main
# from Helper.TimerLogger import CodeTimeLogging
# fileName = main.__file__
# fileName = fileName.split('\\')[-1]
# CodeTimeLogging(Flag='F', filename=fileName, Tag='String', Difficult='Medium')
def shotestWaytoFormString(scr, target):
numMinString = 0
remaning = target
while le... | [
"omkarjoshi4031@live.com"
] | omkarjoshi4031@live.com |
3ef7e25a59a3ca2672554115318f33e31822fd25 | e5dc27e634aba70bcd1b3acea74fed84ddccf837 | /plugins/modules/template_project.py | 432a757ecb62ba97acf49d326d6c97cb68fe269b | [] | no_license | jejrichardson/dnacenter-ansible | 264d1b52227d4bf78ad175494763cff9e7881f34 | f10078ef8323bda4b542e71bcecf4f80a7fe0609 | refs/heads/master | 2023-01-28T09:54:57.449459 | 2020-12-09T23:15:49 | 2020-12-09T23:15:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,792 | py | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2020, Rafael Campos <rcampos@altus.cr>
# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
ANSIBLE_METADATA = {
"metadata_version": "0.0.1",
"status": ["preview"],
"supported_by": "community",
}
DOCUMENTAT... | [
"rcampos@altus.cr"
] | rcampos@altus.cr |
ce4cb92d76d50fbd63accaff41bd8af8bbd952e1 | 0f9b6a33a5e2ce627db75d1bcc34bc3f3674335b | /sctf/2018/catchthebug/exploit.py | 10ff19c7084f606481adcd2e34de7136bf30a20a | [] | no_license | hnoson/writeups | 359a33b03286bab19359ad9b089e6f3bfe4fb708 | 05550e3c462108f6c5ba0b69f65694e2eb1dc9b3 | refs/heads/master | 2021-10-07T18:21:26.041101 | 2021-10-03T10:22:31 | 2021-10-03T10:22:31 | 119,823,623 | 7 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,927 | py | #!/usr/bin/env python
from pwn import *
def catch(name):
while True:
s.sendlineafter('>> ', '1')
s.recvline()
if s.recvline(False) == 'There is no bug =(':
continue
s.sendafter('>> ', name)
break
def inspect(num):
s.sendlineafter('>> ', '2')
ret = []
... | [
"hiroki015@gmail.com"
] | hiroki015@gmail.com |
88bd31ecc6bd237466ec96a185b1d943f4ead144 | 2d060eb9c7126b8963adcad857daa6e39c6ac75f | /Resist.py | 12e4f998383248c49443c1a4b9fc74c578754390 | [] | no_license | easy-rpg/Filler | 43ce36980156f4ffd9597d822e9fa6c19105d892 | 55cddbbb21ac508f64b98ceedbc30c680d4c4951 | refs/heads/master | 2020-03-15T01:38:51.069870 | 2016-09-03T07:12:55 | 2016-09-03T07:12:55 | 131,898,370 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 560 | py | import abc
class Resist_Boa(object):
"""docstring for """
__metaclass__ = abc.ABCMeta
valores = [2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12]
@abc.abstractmethod
def __str__(self):
raise NotImplementedError('users must define __str__ to use this base class')
class Resist_Ruim(object):
"""... | [
"rodrigondec@gmail.com"
] | rodrigondec@gmail.com |
1c29302c75eba77721ac08ae1689249996414741 | 5864e86954a221d52d4fa83a607c71bacf201c5a | /eve/client/script/ui/station/fitting/stanceSlot.py | 4f84e19f8e8023622408b00954931ab6ab6a422f | [] | 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 | 1,646 | py | #Embedded file name: e:\jenkins\workspace\client_SERENITY\branches\release\SERENITY\eve\client\script\ui\station\fitting\stanceSlot.py
from carbonui.primitives.container import Container
from eve.client.script.ui.inflight import shipstance
import carbonui.const as uiconst
class StanceSlots(Container):
def __init_... | [
"le02005@163.com"
] | le02005@163.com |
09da3887cf75a54b9d1965126cebae0ddf5f6475 | 6929f9696a8f90b3778d449a199cee8891f3f739 | /python_core/deligating_to_parent_class_and_slots.py | c23b6fab9843575d3946b69e50da5f32471b0dc8 | [] | no_license | chemplife/Python | 881d492a4271fb2b423f2dd611eaac53a0efdc34 | 7fdfbf442a915e4f41506503baad4345a52d1e86 | refs/heads/master | 2022-12-31T20:00:22.475985 | 2020-10-19T20:14:43 | 2020-10-19T20:14:43 | 305,503,403 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,720 | py | '''
super().method()/attribute
-> To deligate things back to the parent class.
-> Use this only when you have the same named function in the child as well.. Because Python anyways will look uo the heirarchy
if it does not find the method in Child-class.
Eg: class A:
def b():
class B(A):
def c():
... | [
"ratul.aggarwal@outlook.com"
] | ratul.aggarwal@outlook.com |
d022d56454d570a5b887704c79d4d2843271f345 | 576cc83449e10fd3f98281970c46016ea7a5aea2 | /OpenCV拟合与特征点识别/模板匹配角度.py | 78abfbc17a54a507b14bd408976b16d378badf18 | [] | no_license | HotView/PycharmProjects | 215ab9edd341e3293daebcf86d97537f8cd28d75 | 61393fe5ba781a8c1216a5cbe7e0d06149a10190 | refs/heads/master | 2020-06-02T07:41:53.608742 | 2019-11-13T08:31:57 | 2019-11-13T08:31:57 | 191,085,178 | 3 | 2 | null | null | null | null | UTF-8 | Python | false | false | 171 | py | import math
a = math.atan(2/3)
c = math.atan(1)
print(c*180/math.pi)
print(a*180/math.pi)
#theta1 =math.tanh((a))
#print(theta1)
b = math.atan(6/2)
print(b*180/math.pi)
| [
"864773190@qq.com"
] | 864773190@qq.com |
cce1e5cc0fba01f33051132e3981e03cec379801 | a070182e6443995031340802e74d1e65a85bdca3 | /bluelog/utils.py | 4975d944d9c5eebe4486d47ab3fea78ee7fa681c | [] | no_license | huazhicai/bluelog | f86a042a5f3ada46515920c45a0b1452a40d4ad9 | c2a46ac25cbba4ecf7d4e0985ef9010ddae34c01 | refs/heads/master | 2020-04-04T16:33:27.910658 | 2019-01-03T09:59:52 | 2019-01-03T09:59:52 | 156,082,797 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 670 | py | try:
from urlparse import urlparse, urljoin
except ImportError:
from urllib.parse import urlparse, urljoin
from flask import request, redirect, url_for
def is_safe_url(target):
ref_url = urlparse(request.host_url)
test_url = urlparse(urljoin(request.host_url, target))
return test_url.s... | [
"root@localhost.localdomain"
] | root@localhost.localdomain |
d69a39808d6f68572bc01c15f5e876462397f0eb | 4dac40a30e7bbb86ab829fed0cb6f12ff7fa0216 | /djwiki/wiki/models.py | 0e7d732c83f68d3e3e9fb72063d8346168ff24ae | [] | no_license | gzpgg3x/pythonDiary | cc039b716c810f99d5a12b0f4167a711cd6ea18f | 0c3af53dc635d5ff40adad89dce146d6684e162e | refs/heads/master | 2021-01-10T19:55:41.130511 | 2013-04-21T04:37:10 | 2013-04-21T04:37:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 201 | py | from django.db import models
class Page(models.Model):
name = models.CharField(max_length=40, unique=True)
content = models.TextField()
def __unicode__(self):
return self.name | [
"gzpgg3x@yahoo.com"
] | gzpgg3x@yahoo.com |
26952bdc611861509bd368811c1b243e394f7d45 | a32049cdf8cb3403e8e54ddd661f8bb506cca99b | /first_project/first_app/urls.py | f627fd5ffdf7c929f3138c22f3c628b8dc0cf27b | [] | no_license | akhileshvvn/django-deployment-example | 5a3beb8205f2905c99808e983baaf0f8a7a23772 | 45317bb6166527054541e52c8a986f44342ea958 | refs/heads/master | 2022-04-15T08:17:02.615307 | 2020-04-11T07:54:19 | 2020-04-11T07:54:19 | 254,815,719 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 501 | py | from django.urls import path,re_path
from django.conf.urls import url
from . import views
#TEMPLATE TAGGING
app_name = 'first_app'
urlpatterns = [
re_path(r'^index/', views.index, name=''),
re_path(r'formindex/',views.form_name_view,name='form_name'),
re_path(r'^relative/$',views.relative,name = 'relative... | [
"john@sample.com"
] | john@sample.com |
7e5fc8246ba12f67b9efe8fe1433a80bbd6460fe | d4fe66ef7b5bc1745aeb4054b30575fb25a053f4 | /setup.py | d838e226a7de7b9cd782061fb6f64b3134bc06cc | [
"Apache-2.0"
] | permissive | jay-johnson/antinex-client | 796c753bc9df8498f25dca994920b26d8828a940 | 76a3cfbe8a8d174d87aba37de3d8acaf8c4864ba | refs/heads/master | 2021-04-15T15:55:39.670061 | 2020-09-04T19:49:15 | 2020-09-04T19:49:15 | 126,577,469 | 6 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,053 | py | import os
import sys
import warnings
import unittest
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
from setuptools.command.test import test as TestCommand
class PyTest(TestCommand):
user_options = [('pytest-args=', 'a', "Arguments to pass to pytest")]
def in... | [
"jay.p.h.johnson@gmail.com"
] | jay.p.h.johnson@gmail.com |
63f124f199d2e152e2fc67618693c424f3febbb7 | d458b72b4d0e5c51446bb8b9f8a6276015dfb594 | /math/0x02-calculus/10-matisse.py | 88cf330d9c797d23e8f981fda83e54f60879e7f5 | [] | no_license | mecomontes/Machine-Learning-projects | d6588cfaa7d020d3fae0fb74f6550c9e84500578 | 50e1828b58bb58eecfd3a142501b37fe701f4e49 | refs/heads/main | 2023-07-14T12:30:19.792332 | 2021-08-29T15:33:16 | 2021-08-29T15:33:16 | 376,129,791 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 808 | py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Dec 8 9:34:16 2020
@author: Robinson Montes
"""
def poly_derivative(poly):
"""
Function that find the derivate of a polynomial
Arguments:
- poly(list of integers): polynomial to calculate the derivate
Return:
List of coeffi... | [
"1574@holbertonschool.com"
] | 1574@holbertonschool.com |
b49d41c660d323470c0b91f8b0625757281eccd0 | 1be96ee96f3b33469ca073c4f32884cb7230106b | /python3_cron_scripts/libs3/ZoneManager.py | 0531dbedb4a08f885bbf76e4b6fa355e672c65fc | [
"Apache-2.0"
] | permissive | vishnurajkv/Marinus | 3305478038fba8b0ea15dafa2219df9f4df21e9b | 331ba1dc2e99ae99df6c9d93063a852eec41d578 | refs/heads/master | 2020-06-29T10:58:50.196807 | 2019-07-26T20:48:47 | 2019-07-26T20:48:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,583 | py | #!/usr/bin/python3
# Copyright 2018 Adobe. All rights reserved.
# This file is licensed to you 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 requir... | [
"puhley@adobe.com"
] | puhley@adobe.com |
33302759c219b9a3b1fe2347ecb502a4dace1d4d | fc0150b1fd6ba0efd6746a34ffa8cba01640d10e | /Programming Basics with Python - април 2018/04. Complex-Conditions/02. Small Shop.py | f98d0d795257e24d58dfce9db983b1cd9ca6dbeb | [] | no_license | vgrozev/SofUni_Python_hmwrks | 7554d90f93b83d58e386c92dac355573c8cda848 | b10a941a0195ea069e698b319f293f5b4a660547 | refs/heads/master | 2021-06-08T19:40:27.009205 | 2019-11-24T17:19:31 | 2019-11-24T17:19:31 | 95,629,443 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,132 | py | product = input().lower()
town = input().lower()
quantity = float(input())
total = 0.0
if town == 'sofia':
if product == 'coffee':
total = quantity * 0.50
elif product == 'peanuts':
total = quantity * 1.60
elif product == 'beer':
total = quantity * 1.20
elif product == 'water':
... | [
"vgrozev@gmail.com"
] | vgrozev@gmail.com |
2d6e5705b0d6fc9452a7eef4f715005355db0acf | 0067290f8a2c5c367eee2e76f7ec743719d5b59c | /one/two/migrations/0002_auto_20170802_1924.py | 02ba77ac66799d0a3867254c03ad5115c12deb5d | [] | no_license | 8880/Django | d81da8f410845676606eb148a609f56792a14b1b | 469fe07475c2f7c6e2d1ba1e2119b59550f154e6 | refs/heads/master | 2021-01-16T17:54:58.393384 | 2017-08-19T02:55:11 | 2017-08-19T02:55:11 | 100,019,134 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,264 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.3 on 2017-08-02 11:24
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('two', '0001_initial'),
... | [
"klous530.outlook.com"
] | klous530.outlook.com |
a4e3c2a78a101ae2c35ecf31315de44d777b253f | 89cd8b77ad5171c336cc60b2133fe6468a6cb53f | /Module01_CZ/day7_data_struct_str/04-代码/day7/125_字符串高级操作(判断型).py | 8f356536eabd5e44cafbc8624e413494095895a0 | [
"MIT"
] | permissive | fenglihanxiao/Python | 75178f6b6b0c53345e1ed54226ea645216572d6c | 872baf3a3a5ee42740161152605ca2b1ddf4cd30 | refs/heads/master | 2021-05-23T18:49:20.656433 | 2020-04-29T01:06:21 | 2020-04-29T01:06:21 | 253,199,073 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 272 | py | """
演示字符串判断型操作
"""
# str1 = "\n"
# print(str1.islower())
# print(str1.isupper())
name = "张三丰"
print(name.startswith("张三"))
filename="1.jpge"
if filename.endswith(".jpg") or filename.endswith(".png") :
print("该文件是一个图片")
| [
"fenglihanxiao@qq.com"
] | fenglihanxiao@qq.com |
a268ef38a2861b114ef4f65c5e31730ade40cc92 | 7f68bbb3fd328a4d6bbabecb44305987d8cbbfc4 | /django/django-intro/home/workspace/PROJECT8/movies/forms.py | 96b211b33850d9d51473be7e05a26ff57cb8c511 | [] | no_license | seunghoon2334/TIL | c84f9f9e68c8ccc7a1625222fe61f40739774730 | 51cfbad2d9b80a37b359716fca561c2a5c5b48b3 | refs/heads/master | 2022-12-18T18:20:19.210587 | 2019-11-26T03:14:23 | 2019-11-26T03:14:23 | 162,101,369 | 0 | 0 | null | 2022-11-22T03:59:16 | 2018-12-17T08:51:53 | C | UTF-8 | Python | false | false | 491 | py | from django import forms
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Submit
from .models import Movie
# modelform
class MovieForm(forms.ModelForm):
class Meta:
model = Movie
fields = '__all__'
def __init__(self, *args, **kwargs):
super()._... | [
"gogo12394@naver.com"
] | gogo12394@naver.com |
5837d24747eb111593c4fdc4fdb16c2048efb91e | d3e6d6555b0314936902727af36de2f1b7432bf8 | /linked-list-cycle/linked-list-cycle.py | af4d1032682c25c061b7019097dc1288fceab653 | [] | no_license | fly2rain/LeetCode | 624b1e06e1aa3174dfb5c81834b58cc8fd7ad073 | 4ddb5a051c6e2051f016a675fd2f5d566c800c2a | refs/heads/master | 2021-01-18T03:12:22.402044 | 2015-12-28T04:31:19 | 2015-12-28T04:31:19 | 85,842,050 | 0 | 1 | null | 2017-03-22T15:05:20 | 2017-03-22T15:05:19 | null | UTF-8 | Python | false | false | 771 | py |
from utils import ListNode
class Solution(object):
def hasCycle(self, head):
"""
:type head: ListNode
:rtype: bool
"""
if not head:
return False
prev, current = head, head.next
head.next = None
while current:
if current == hea... | [
"xuzheng1111@gmail.com"
] | xuzheng1111@gmail.com |
d3ef5ccaa99988559bd5fde97a0082c970a270a1 | 1548ce77537dcd50ab04b0eaee050b5d30553e23 | /autotabular/algorithms/ctr/xdfm.py | 003e7cba0a5433e271cb0403bed753da731ebcad | [
"Apache-2.0"
] | permissive | Shamoo100/AutoTabular | 4a20e349104246bf825ebceae33dca0a79928f2e | 7d71bf01d2b7d84fcf5f65c9f45c5cea1255d8a2 | refs/heads/main | 2023-08-13T21:34:34.329888 | 2021-10-02T07:06:00 | 2021-10-02T07:06:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,338 | py | import torch
from autotabular.algorithms.ctr.layer import CompressedInteractionNetwork, FeaturesEmbedding, FeaturesLinear, MultiLayerPerceptron
class ExtremeDeepFactorizationMachineModel(torch.nn.Module):
"""A pytorch implementation of xDeepFM.
Reference:
J Lian, et al. xDeepFM: Combining Explicit an... | [
"jianzhnie@126.com"
] | jianzhnie@126.com |
ba4a59497f41ffefe8c698f0a65012b2d35d88e6 | b5aeb0f8b8efc77d77842237a80cce90e529ac5f | /config/settings.py | 04b0faaaab467f76b64edc86c9631e42ab3f4de5 | [] | no_license | Pillin/POC-Django-Cooker | b078502d403a90cc57c4691265235ce855c8d75e | e6ad88564d3045af4a418234a927970f928e3c58 | refs/heads/master | 2022-12-12T15:02:41.410674 | 2019-09-30T03:41:28 | 2019-09-30T03:41:28 | 210,078,139 | 1 | 0 | null | 2022-12-08T05:22:06 | 2019-09-22T02:13:33 | Python | UTF-8 | Python | false | false | 4,361 | py | """
Django settings for nora project.
Generated by 'django-admin startproject' using Django 2.2.1.
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
impor... | [
"ignacia.pp@gmail.com"
] | ignacia.pp@gmail.com |
e569fc7fc6e893e1d228b1d7e4971dcb65008fb8 | 45cc3880f3444276cebb0a7f91d3b146cd27b9d0 | /beeprint/printer.py | 63fe4de1510c7695ba066e8687e34780d93a7b3e | [] | no_license | aijikl/beeprint | 056aa84ff73da93c50143c83bed0fdf54bd37ee5 | 0380a942c0ad56ab219a51c728b4244a9b49f405 | refs/heads/master | 2021-01-20T04:25:26.858124 | 2017-04-04T06:50:36 | 2017-04-04T06:50:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,603 | py | # -*- coding:utf-8 -*-
from __future__ import print_function
from __future__ import absolute_import
from __future__ import unicode_literals
from __future__ import division
import sys
import traceback
import types
import inspect
from io import StringIO
from .utils import pyv
if pyv == 2:
# avoid throw [UnicodeEnc... | [
"568397440@qq.com"
] | 568397440@qq.com |
fcaf8123dd2fd421f5fc4ee011401898730fd1c1 | be0f3dfbaa2fa3d8bbe59229aef3212d032e7dd1 | /Gauss_v45r10p1/Gen/DecFiles/options/11114095.py | 04981cbb389888968150d038dc6a792df1581176 | [] | no_license | Sally27/backup_cmtuser_full | 34782102ed23c6335c48650a6eaa901137355d00 | 8924bebb935b96d438ce85b384cfc132d9af90f6 | refs/heads/master | 2020-05-21T09:27:04.370765 | 2018-12-12T14:41:07 | 2018-12-12T14:41:07 | 185,989,173 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,637 | py | # file /home/hep/ss4314/cmtuser/Gauss_v45r10p1/Gen/DecFiles/options/11114095.py generated: Wed, 25 Jan 2017 15:25:18
#
# Event Type: 11114095
#
# ASCII decay Descriptor: [B0 -> K+ pi- (Higgs0 -> mu+ mu-)]cc
#
from Configurables import Generation
Generation().EventType = 11114095
Generation().SampleGenerationTool = "Sig... | [
"slavomirastefkova@b2pcx39016.desy.de"
] | slavomirastefkova@b2pcx39016.desy.de |
56fcd9d7569cd87ba0cc217a1be8e88301bac6f5 | 361ac3fcf36d80c792b60b7e2284cb1dc8d77944 | /osa03-16_sanojen_ensimmaiset_kirjaimet/test/test_sanojen_ensimmaiset_kirjaimet.py | bd5cdde1c62e7f1ca35d82db216518e44c552e43 | [] | no_license | darkismus/mooc-ohjelmointi-21 | 48cc20391db4240104549d4f3834a67c77976f6d | 5f72dd9cff78704a2a0f5bc1cc18c7740ce50c51 | refs/heads/main | 2023-08-01T03:35:13.244978 | 2021-09-14T10:49:37 | 2021-09-14T10:49:37 | 368,469,947 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,507 | py | import unittest
from unittest.mock import patch
from tmc import points
from tmc.utils import load_module, reload_module, get_stdout
from functools import reduce
exercise = 'src.sanojen_ensimmaiset_kirjaimet'
def outputs_equal(str1 : str, str2 : str) -> bool:
return str1.lower() == str2.lower()
def get_correct(s... | [
"tuomas.puikkonen@iki.fi"
] | tuomas.puikkonen@iki.fi |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.