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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
70001b56d298f5befbbcdf00e94f61e060b46a96 | 21b0483666d8e5cbdc4a911bda93e1a3392c40ec | /lib/initialConditions.py | 1f3e0b6022939d9fa360915afc8482217719f223 | [] | no_license | Christopher-Bradshaw/fluids_final | 0541111323c640b40ee86f970acb896689bbb867 | 2e33b2ef04fdbd40760c1804a02c86c93c5fd926 | refs/heads/master | 2021-08-24T03:13:43.132099 | 2017-12-07T20:33:31 | 2017-12-07T20:33:31 | 113,245,782 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,193 | py | import numpy as np
def getPressure(energy, volume, gamma):
return energy * (gamma - 1) / volume
def getFlatConfig():
dx = 1
width = 5
gamma = 5/3
# Densities
initialRho = np.ones(width) # this will never change
summedInitialRho = np.array([
initialRho[i] + initialRho[i+1] for i in ... | [
"christopher.peter.bradshaw+github@gmail.com"
] | christopher.peter.bradshaw+github@gmail.com |
40b4fc7442a3dca396d30cd384a4df70fbca793d | a6d8465aed280c36fb7129e1fa762535bae19941 | /embroidery365/builder/migrations/0015_auto_20171107_1318.py | e8fb24e2d785b3b21a4799b1ab238de547240bcb | [] | no_license | rahuezo/365digitizing_and_embroidery | c61c53f567e73163a67d3fd568a20551a3681ccd | 41a22b6ff8bd83238219f2d34ce13b5a8ef9bb57 | refs/heads/master | 2020-09-02T11:59:07.702947 | 2017-11-11T02:40:01 | 2017-11-11T02:40:01 | 98,377,801 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 493 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.2 on 2017-11-07 21:18
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('builder', '0014_order_extra_details'),
]
operations = [
migrations.AlterFie... | [
"rahuezo@ucdavis.edu"
] | rahuezo@ucdavis.edu |
2ef93f787a9d83908066ad2e141bcdc977dc2348 | 09e57dd1374713f06b70d7b37a580130d9bbab0d | /data/cirq_new/cirq_program/startCirq_pragma99.py | e33f306588051a905793954fdd141d45e8a365b0 | [
"BSD-3-Clause"
] | permissive | UCLA-SEAL/QDiff | ad53650034897abb5941e74539e3aee8edb600ab | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | refs/heads/main | 2023-08-05T04:52:24.961998 | 2021-09-19T02:56:16 | 2021-09-19T02:56:16 | 405,159,939 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,468 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 5/15/20 4:49 PM
# @File : grover.py
# qubit number=4
# total number=11
import cirq
import cirq.google as cg
from typing import Optional
import sys
from math import log2
import numpy as np
class Opty(cirq.PointOptimizer):
def optimization_at(
... | [
"wangjiyuan123@yeah.net"
] | wangjiyuan123@yeah.net |
b89e6024ba7fcd2978bed43342381eaea6996fb3 | 5ebfced62f59052560c6adf89bfd2f249877cc75 | /webcomics/series/urls.py | 46b8c581e3ef21673277aa776913f4bad5bfbd5c | [] | no_license | lumenwrites/webcomics | 537c9bd0337ebd087dacdee7b72797b658481f8c | 34200eaf19021147c561bf140a685e398156589e | refs/heads/master | 2021-06-10T17:12:50.317113 | 2017-02-19T09:28:57 | 2017-02-19T09:28:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 882 | py | from django.conf.urls import url
from . import views
from posts.views import SeriesFeed
urlpatterns = [
# url(r'^$', views.BrowseView.as_view(), name='post-list'),
url(r'^create-series/$', views.SeriesCreate.as_view(), name='series-create'),
url(r'^series/(?P<slug>[^\.]+)/edit$', views.SeriesEdit.as_vie... | [
"raymestalez@gmail.com"
] | raymestalez@gmail.com |
daae7ab1b7ac6d998eca5a559c61ec45f2d7095e | 25985aeeee54373d26a164e4cc6a014770e3ebf3 | /windows/w3af/w3af/core/data/nltk_wrapper/.svn/text-base/nltk_wrapper.py.svn-base | 3f652ee04b353c653d75d4761f71621362d73520 | [] | no_license | sui84/tools | 4b750dae90940fbe3a226cba72dc071d8fb88b7c | 651cc08eb50199ce1044c684dbf714ea26df6432 | refs/heads/master | 2021-01-22T19:22:26.964580 | 2017-08-20T15:23:38 | 2017-08-20T15:23:38 | 100,774,276 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,047 | '''
nltk_wrapper.py
Copyright 2011 Andres Riancho
This file is part of w3af, w3af.sourceforge.net .
w3af is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation version 2 of the License.
w3af is distributed in the hope... | [
"sui84@126.com"
] | sui84@126.com | |
214374daa226d99e5073ab7b542cbb0a073ca027 | fce6762c17fc81009af226f71ca32d2dc8227beb | /Section 4 Matrix multiplications.py | 952e60e048ad9f035f59866a9b471ae7989ef640 | [] | no_license | kuangzijian/Linear-Algebra | 3f9599ef282283dfc6bd49c0c97327a8fa31e671 | 94a872502ff570f04d61cb7bf1db653681f403c3 | refs/heads/master | 2022-11-04T07:05:55.272865 | 2019-07-31T05:32:42 | 2019-07-31T05:32:42 | 196,622,918 | 0 | 1 | null | 2022-10-29T19:00:25 | 2019-07-12T17:57:11 | Python | UTF-8 | Python | false | false | 7,048 | py | import numpy as np
import matplotlib.pyplot as plt
import math
from sympy import *
#Standard matrix multiplication, parts 1 & 2
## rules for multiplication validity
m = 4
n = 3
k = 6
# make some matrices
A = np.random.randn(m,n)
B = np.random.randn(n,k)
C = np.random.randn(m,k)
# test which multiplications are valid... | [
"kuangzijian1@hotmail.com"
] | kuangzijian1@hotmail.com |
3482c862a6405f9d46af7e9c72673545f05201a1 | eb8b5cde971573668800146b3632e43ed6e493d2 | /python/oneflow/test/modules/test_instruction_replay.py | e9fbd188d1ecc88127be665d92a6ea691ab0065a | [
"Apache-2.0"
] | permissive | big-data-ai/oneflow | 16f167f7fb7fca2ce527d6e3383c577a90829e8a | b1c67df42fb9c5ab1335008441b0273272d7128d | refs/heads/master | 2023-07-08T21:21:41.136387 | 2021-08-21T11:31:14 | 2021-08-21T11:31:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,832 | py | """
Copyright 2020 The OneFlow Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agr... | [
"noreply@github.com"
] | big-data-ai.noreply@github.com |
30b31dbb48ee318100dfe52ceb8b3bf19ac84ee9 | 9aab01a48d1af5c4f1889ae9d27940f8bc738d37 | /Mindshare/project_management/cvr/tables.py | 4143730b11b7ed81bf26920c54a9c284e43bd1ea | [] | no_license | raveena17/workout-ex | 274998170a3cfbf42bffe61d49fce8531eddc3f5 | a9c652535f33d05199b3c5d26b72c721a822a2b7 | refs/heads/master | 2021-09-05T10:06:46.399468 | 2018-01-26T08:36:58 | 2018-01-26T08:36:58 | 119,025,925 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 521 | py | # import django_tables2 as tables
# from .models import Cvr
# #class django_tables2.columns.LinkColumn(, urlconf=None, , kwargs=None, current_app=None, attrs=None, **extra)
# class CVRTable(tables.Table):
# id = tables.LinkColumn(viewname='edit_cvr', args=[tables.A('pk')])
# class Meta:
# model = Cvr... | [
"raveena@5gindia.net"
] | raveena@5gindia.net |
6c79ae8cc7aed21c5f2b9410bcf90b219dedfe16 | 07af444dafa5bde373b0730e92d67e455d4ff4df | /SFData/StackOverflow/s36972087_ground_truth.py | 79f82ae3f49c2bb32dc969c91d323ecc4f7a516f | [] | no_license | tensfa/tensfa | 9114595b58a2e989780af0c348afb89a2abb04b4 | 415dcfaec589b0b14c5b9864872c912f3851b383 | refs/heads/main | 2023-06-30T14:27:38.217089 | 2021-08-03T01:33:30 | 2021-08-03T01:33:30 | 368,465,614 | 2 | 3 | null | null | null | null | UTF-8 | Python | false | false | 1,008 | py | import tensorflow as tf
import numpy as np
train_images = np.array(np.random.random((10, 19)), dtype=np.float32)
train_labels = np.random.randint(0, 2, 10, dtype=np.int32)
train_labels = np.eye(2)[train_labels]
sess = tf.InteractiveSession()
x = tf.placeholder(tf.float32, shape=[None, 19])
y_ = tf.placeholder(tf.flo... | [
"tensfa@yeah.net"
] | tensfa@yeah.net |
62a13abd4c0147da29cd785233f04f06aca6a23a | 2a8abd5d6acdc260aff3639bce35ca1e688869e9 | /telestream_cloud_qc_sdk/test/test_container_essence_consistency_test.py | a53e951acde1e1e1d545fa4c1388c5f5ecb32225 | [
"MIT"
] | permissive | Telestream/telestream-cloud-python-sdk | 57dd2f0422c83531e213f48d87bc0c71f58b5872 | ce0ad503299661a0f622661359367173c06889fc | refs/heads/master | 2021-01-18T02:17:44.258254 | 2020-04-09T11:36:07 | 2020-04-09T11:36:07 | 49,494,916 | 0 | 0 | MIT | 2018-01-22T10:07:49 | 2016-01-12T11:10:56 | Python | UTF-8 | Python | false | false | 1,600 | py | # coding: utf-8
"""
Qc API
Qc API # noqa: E501
The version of the OpenAPI document: 3.0.0
Contact: cloudsupport@telestream.net
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import unittest
import datetime
import telestream_cloud_qc
from telestream_cl... | [
"cloudsupport@telestream.net"
] | cloudsupport@telestream.net |
5c90209a2a85242d66565dc74c3d13c88a2f10b7 | e7b7505c084e2c2608cbda472bc193d4a0153248 | /DailyChallenge/LC_126.py | 6a71e599fd82c9936054243d450e4e182fae01a5 | [] | no_license | Taoge123/OptimizedLeetcode | 8e5c1cd07904dfce1248bc3e3f960d2f48057a5d | 3e50f6a936b98ad75c47d7c1719e69163c648235 | refs/heads/master | 2023-02-27T21:13:40.450089 | 2023-02-07T04:11:09 | 2023-02-07T04:11:09 | 170,044,224 | 9 | 3 | null | null | null | null | UTF-8 | Python | false | false | 1,181 | py |
class Solution:
def findLadders(self, beginWord: str, endWord: str, wordList):
#we dont need visited since we will remove the newLayer.values() for the words we have processed
wordList = set(wordList)
res = []
lowercase = string.ascii_lowercase
#layer is similar to queue ... | [
"taocheng984@gmail.com"
] | taocheng984@gmail.com |
4e7eb91fe1d09211b9bd1a08ad237e37699b1484 | ac549e553263801bdc6962a10ebbe784dc2631df | /Python/graphs/traversal.py | e3e6b65ebfcfc36492062561afd6ccc02a61bcd2 | [] | no_license | Bishal44/DataStructure | e595890d18bde39e65f02a7ca3a6904c6070c3c8 | 939c47de6dcfe3b2578aaa0610d3cdc5726572c7 | refs/heads/master | 2020-09-10T22:40:46.368607 | 2020-03-28T12:15:08 | 2020-03-28T12:15:08 | 221,854,694 | 0 | 0 | null | 2019-12-10T15:47:45 | 2019-11-15T05:59:40 | Python | UTF-8 | Python | false | false | 1,863 | py | '''
Created on Sat Jan 11 2020
'''
graph = {'A': set(['B', 'C', 'F']),
'B': set(['A', 'D', 'E']),
'C': set(['A', 'F']),
'D': set(['B']),
'E': set(['B', 'F']),
'F': set(['A', 'C', 'E'])}
# dfs and bfs are the ultimately same except that they are visiting nodes in
# differe... | [
"bhattaraibishal704@gmail.com"
] | bhattaraibishal704@gmail.com |
b08ad2fefef80365d87004cef4629d3c62aa60b3 | a46d135ba8fd7bd40f0b7d7a96c72be446025719 | /packages/python/plotly/plotly/validators/layout/legend/_traceorder.py | d5fe177e6cf14ddf521d4e55b0eef9d2d0fa8d2e | [
"MIT"
] | permissive | hugovk/plotly.py | 5e763fe96f225d964c4fcd1dea79dbefa50b4692 | cfad7862594b35965c0e000813bd7805e8494a5b | refs/heads/master | 2022-05-10T12:17:38.797994 | 2021-12-21T03:49:19 | 2021-12-21T03:49:19 | 234,146,634 | 0 | 0 | MIT | 2020-01-15T18:33:43 | 2020-01-15T18:33:41 | null | UTF-8 | Python | false | false | 532 | py | import _plotly_utils.basevalidators
class TraceorderValidator(_plotly_utils.basevalidators.FlaglistValidator):
def __init__(self, plotly_name="traceorder", parent_name="layout.legend", **kwargs):
super(TraceorderValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent... | [
"noreply@github.com"
] | hugovk.noreply@github.com |
fb2dc56539cdf51cd1d14fa04f375e98d0178ecc | ea16c6da19fce9a4dff085aaeff3ac12baa21d59 | /tests/test_obvs.py | 5febd213e3768347232d28f1e8c604c5c017648c | [] | no_license | changhoonhahn/specmulator | a31b17aeab1ba1a29118e431fd7558dd8bbc7e5b | 9453e7fcc30d74b732594bfb78f7e4f5d20bc95f | refs/heads/master | 2021-09-10T18:57:21.361837 | 2018-03-31T05:52:33 | 2018-03-31T05:52:33 | 106,511,656 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,710 | py | import numpy as np
import env
import util as UT
import obvs as Obvs
import matplotlib as mpl
import matplotlib.pyplot as plt
mpl.rcParams['text.usetex'] = True
mpl.rcParams['font.family'] = 'serif'
mpl.rcParams['axes.linewidth'] = 1.5
mpl.rcParams['axes.xmargin'] = 1
mpl.rcParams['xtick.labelsize'] = 'x-large'
mpl.... | [
"chh327@nyu.edu"
] | chh327@nyu.edu |
d7f53e22fde0ca53ee451f3ff3b5e007a16c8a41 | 9c61ec2a55e897e4a3bb9145296081c648d812c4 | /docs/cd/06443007程式碼/ch01/1-8.py | d27b4e821287c1d67dba80b1f5b27da4d527b6e6 | [] | no_license | wildboy2arthur/ML-Class | 47899246251d12972a6d3875160c1cc8d1052202 | 345c86e3f8890919d59a63a79674acbdcd4577c4 | refs/heads/main | 2023-07-16T11:32:07.683652 | 2021-08-24T08:25:04 | 2021-08-24T08:25:04 | 399,388,026 | 0 | 0 | null | 2021-08-24T08:18:36 | 2021-08-24T08:18:35 | null | UTF-8 | Python | false | false | 240 | py | def cal_price_dict(k_cost):
rate = 0.03
nt_cost = k_cost * rate
inc = 0.2
nt_price = nt_cost * (1 + inc)
data = {
'k_cost': k_cost,
'nt_cost': nt_cost,
'nt_price': nt_price
}
return data | [
"1101404110@nkust.edu.tw"
] | 1101404110@nkust.edu.tw |
4da999cb489a900fa165b6cd924ab3776644bd18 | 9973dd9a35333f1b24e4c1e3cd2098391d17e193 | /clones/migrations/0002_auto_20200216_2103.py | d210099b236272054745ccd1c53767889b1d5bc6 | [] | no_license | smilepogz/FinalTrelloClone | 5140f804ceeb02e6969cb5693daa3cad7e296961 | 9affade23a0b911baa5fa11d9d2ce83e3db669e7 | refs/heads/master | 2021-01-04T11:20:08.893932 | 2020-02-17T13:44:11 | 2020-02-17T13:44:11 | 240,524,496 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 699 | py | # Generated by Django 3.0.3 on 2020-02-16 13:03
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('clones', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='boardlist',
name='title',
... | [
"you@example.com"
] | you@example.com |
020942a036c94976bc69092a9f4d19b9c8c7ad90 | 8f455679fdb8e05c4c78141a8065250696d68d89 | /MultiNetV1.py | f46219308f3cf2135c2153d96f56870b3514b6ff | [
"MIT"
] | permissive | x5g/dogs_vs_cats | 63a17ac914ded5850d6d4e745408d50e4d242f74 | 8a6b992fe9abc6b20b31729eaec79ca8d6ec12e0 | refs/heads/master | 2022-10-20T02:25:51.097115 | 2020-06-09T17:21:52 | 2020-06-09T17:21:52 | 271,065,547 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,326 | py | import plaidml.keras
plaidml.keras.install_backend()
import os
os.environ["KERAS_BACKEND"] = "plaidml.keras.backend"
import keras
import matplotlib.pyplot as plt
import numpy as np
import ssl
ssl._create_default_https_context = ssl._create_unverified_context
ROWS = 299
COLS = 299
CHANNELS = 3
batch_size = 32
epochs =... | [
"1098766468@qq.com"
] | 1098766468@qq.com |
8e3f054d598f85623ae2376aac935bda04e154d6 | afbae26b958b5ef20548402a65002dcc8e55b66a | /ironstubs/process_stubs.py | 570dd3fd93b8d1d96302c69f2f0d497a9dd5adf3 | [
"MIT"
] | permissive | gtalarico/ironpython-stubs | d875cb8932c7644f807dc6fde9dd513d159e4f5c | c7f6a6cb197e3949e40a4880a0b2a44e72d0a940 | refs/heads/master | 2023-07-12T01:43:47.295560 | 2022-05-23T18:12:06 | 2022-05-23T18:12:06 | 95,340,553 | 235 | 88 | NOASSERTION | 2023-07-05T06:36:28 | 2017-06-25T05:30:46 | Python | UTF-8 | Python | false | false | 6,253 | py | """ Stub Generator for IronPython
Extended script based on script developed by Gary Edwards at:
gitlab.com/reje/revit-python-stubs
This is uses a slightly modify version of generator3,
github.com/JetBrains/intellij-community/blob/master/python/helpers/generator3.py
Iterates through a list of targeted assembl... | [
"gtalarico@gmail.com"
] | gtalarico@gmail.com |
9fabaf664d6dbaf4dd42fc7eb23fb3b411cfd395 | 845d8e6816e91474e673b6cda452254d40c65e5c | /django_mailbox/transports/mmdf.py | ad462849609331fa0f5cdc9bf69e107179dd2cb7 | [] | no_license | redtoad/django-mailbox | d0847f7f29f4e4459045e8d9d3d5d1406968175b | 6da17053d495bee58ea78d4fb394d7618aeaab1a | refs/heads/master | 2021-01-01T15:36:55.409316 | 2013-06-12T06:50:25 | 2013-06-12T06:50:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 152 | py | from mailbox import MMDF
from django_mailbox.transports.generic import GenericFileMailbox
class MMDFTransport(GenericFileMailbox):
_variant = MMDF
| [
"me@adamcoddington.net"
] | me@adamcoddington.net |
6204778bccce5acd82eee6997003e783a16005fd | a939e018333a9ecd26ddc618f99835b7eb381686 | /.svn/tmp/tempfile.2.tmp | 509885ba67010786fd018501957f1787d480a5c8 | [] | no_license | cash2one/crawl_youtube | bff5ba254001c2f31f770e55a4aca39bc54e45ee | 0dc40186a1d89da2b00f29d4f4edfdc5470eb4fc | refs/heads/master | 2021-01-16T22:30:17.800282 | 2016-02-18T11:50:09 | 2016-02-18T11:50:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,117 | tmp | #!/usr/bin/python
# coding=utf8
# Copyright 2015 LeTV Inc. All Rights Reserved.
# author: gaoqiang@letv.com (Qiang Gao)
import os
import signal
from le_crawler.common.logutil import Log
thrift_logger = Log('thrift.server.TServer', 'log/thrift_filter.error').log
from optparse import OptionParser
from thrift.transport... | [
"zjc0516@126.com"
] | zjc0516@126.com |
6951735b5119448cb7a86cf403b941f92733e4b0 | f46966a5e49a6138182635a4850738a18eec01e5 | /scripts/utils/bcbio_prep_cwl_genomes.py | d704120ef6fa0e7407cca8ec06c5c6a3272e0319 | [
"MIT"
] | permissive | jchenpku/bcbio-nextgen | 44a9247a0e1314aaba66d1f9941540ddb2993bde | 9ddbfcc6f2595298ae8aad3adfa6a568a2a4c62f | refs/heads/master | 2020-08-01T03:06:30.695158 | 2019-10-07T00:21:32 | 2019-10-07T00:21:32 | 73,585,332 | 1 | 0 | MIT | 2019-10-07T00:21:33 | 2016-11-12T23:49:31 | Python | UTF-8 | Python | false | false | 2,642 | py | #!/usr/bin/env python
"""Clean and prepare a set of genomes for CWL usage and upload.
bcbio with CWL can read directly from a reference genome folder
without using Galaxy location files. This allows both local and
remote usage on object stores (Arvados, DNAnexus, SevenBridges, Synapse, S3).
This copies from an existi... | [
"chapmanb@50mail.com"
] | chapmanb@50mail.com |
000ad2bfe0221337ebe78b33b4c1046aed21085d | 46b432cd3557038c454601367b878f889c9b6a8f | /kiyuna/tutorial04/test_hmm.py | b2b0fc5a973faf6fbfb2ad7d8772238651f39b66 | [] | no_license | tmu-nlp/NLPtutorial2019 | 84ceec06568fd9d899a686658fb8851466133375 | d77d199c50cd37d70e462209a7bfcd4dee9140a1 | refs/heads/master | 2020-05-14T13:34:05.336594 | 2019-09-25T02:25:41 | 2019-09-25T02:25:41 | 181,814,723 | 1 | 0 | null | 2019-08-01T18:53:54 | 2019-04-17T04:04:06 | Python | UTF-8 | Python | false | false | 3,896 | py | '''
隠れマルコフモデルによる品詞推定
'''
import os
import sys
import subprocess
from collections import defaultdict
from math import log2
os.chdir(os.path.dirname(os.path.abspath(__file__))) # cd .
def message(text):
print("\33[92m" + text + "\33[0m")
def load_model(model_file):
possible_tags = defaultdict(int)
emi... | [
"kyuna.prog@gmail.com"
] | kyuna.prog@gmail.com |
c697740729c72361e89fa3f8b66eec1705d07e84 | 09e57dd1374713f06b70d7b37a580130d9bbab0d | /data/p4VQE/R3/benchmark/startPyquil348.py | c41069924278a31fe96eac76877e55e4208814cf | [
"BSD-3-Clause"
] | permissive | UCLA-SEAL/QDiff | ad53650034897abb5941e74539e3aee8edb600ab | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | refs/heads/main | 2023-08-05T04:52:24.961998 | 2021-09-19T02:56:16 | 2021-09-19T02:56:16 | 405,159,939 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,196 | py | # qubit number=4
# total number=13
import pyquil
from pyquil.api import local_forest_runtime, QVMConnection
from pyquil import Program, get_qc
from pyquil.gates import *
import numpy as np
conn = QVMConnection()
def make_circuit()-> Program:
prog = Program() # circuit begin
prog += H(1) # number=2
pr... | [
"wangjiyuan123@yeah.net"
] | wangjiyuan123@yeah.net |
66c35ef831aaa59121f0b9b48d719fee7b050b34 | 078686dd88ff399cb3f9f773d237a7b18adf513a | /fund_crawl.py | 2e11bb1c2315571f53e2f78a3e04f58a7555f55c | [] | no_license | kh7160/lotto | b1995bb9488a02f9c0656779cb6bb118aa1d66b0 | 9c6b764bcc7244729d8ad39637de3d029f8f4b26 | refs/heads/master | 2023-02-28T00:12:27.295284 | 2021-02-01T10:49:20 | 2021-02-01T10:49:20 | 334,917,528 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 842 | py | import requests
from bs4 import BeautifulSoup
import fund_parse
url = 'https://dhlottery.co.kr/common.do?method=main'
resp = requests.get(url)
soup = BeautifulSoup(resp.text, 'html.parser')
# 7 num crawling
group = soup.select('.group .num span')
group = group[0].text
num = []
num.append(int(soup.find_all('span', {... | [
"kh7160@naver.com"
] | kh7160@naver.com |
ddff08d9864dfe1076ecf400d73e63b3b20a37df | 1a663b69c47ac56c38aed5704fc403df82b48491 | /teafacto/scripts/theanowrap.py | 331e4da792e0cef33af941df2b7e907443d1db42 | [
"MIT"
] | permissive | lukovnikov/teafacto | 9c0dda1dbb1abbcff795097a3522178ad5395852 | 5e863df8d061106ad705c0837f2d2ca4e08db0e4 | refs/heads/master | 2020-04-04T05:53:56.616520 | 2017-02-08T21:03:17 | 2017-02-08T21:03:17 | 46,288,607 | 2 | 5 | null | 2016-04-13T12:25:47 | 2015-11-16T16:52:23 | Python | UTF-8 | Python | false | false | 710 | py | from teafacto.core.base import tensorops as T, Val, param
import numpy as np
import sys
x = Val(np.random.random((10,10)))
#y = Val(np.random.random((10,10)))
y = param((10, 10), name="y").uniform()
w = param((10, 10), name="w").uniform()
#z = T.dot(x, y)
z = (x + y)
u = z * w
s = T.nnet.sigmoid
s2 = T.nnet.sigmoid
p... | [
"lukovnikov@outlook.com"
] | lukovnikov@outlook.com |
59c6f29c6c88c672ad008ad803c796881d0de0c6 | 938a089e9b5e876a3b48932274171da7a4e7aa42 | /bench/genesys2.py | 2332f797a6bd9cebe7f8ad88338e320f41377567 | [
"BSD-3-Clause",
"BSD-2-Clause"
] | permissive | rprinz08/liteeth | aa94e0eb790ba571ea59e98697d11300a57b3d03 | dc10f82753efd236e1811a72c4be2c27cefd2c68 | refs/heads/master | 2023-07-18T17:17:06.441779 | 2021-09-10T08:06:47 | 2021-09-10T08:06:47 | 260,763,015 | 0 | 0 | NOASSERTION | 2020-05-02T19:47:32 | 2020-05-02T19:47:32 | null | UTF-8 | Python | false | false | 2,680 | py | #!/usr/bin/env python3
#
# This file is part of LiteEth.
#
# Copyright (c) 2020 Florent Kermarrec <florent@enjoy-digital.fr>
# SPDX-License-Identifier: BSD-2-Clause
import os
import argparse
from migen import *
from litex_boards.platforms import genesys2
from litex_boards.targets.genesys2 import _CRG
from litex.so... | [
"florent@enjoy-digital.fr"
] | florent@enjoy-digital.fr |
6387f24c6cee7a4d44c898fadc2886bc1358fc85 | cb3d1b072391b07ef0e9596df7f223f37683e970 | /[0333]_Largest_BST_Subtree/Largest_BST_Subtree.py | 20ac486fdae272035ca2cdb53f05e32e45ab550b | [] | no_license | kotori233/LeetCode | 99620255a64c898457901602de5db150bc35aabb | 996f9fcd26326db9b8f49078d9454fffb908cafe | refs/heads/master | 2021-09-10T18:00:56.968949 | 2018-03-30T14:38:27 | 2018-03-30T14:38:27 | 103,036,334 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 835 | py | # Definition for a binary tree node.
# class TreeNode(object):
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution(object):
def largestBSTSubtree(self, root):
"""
:type root: TreeNode
:rtype: int
"""
sel... | [
"cycycy3333@163.com"
] | cycycy3333@163.com |
4fccc4958d08996a263601b37e9b8b1a85416c19 | 8997a0bf1e3b6efe5dd9d5f307e1459f15501f5a | /stackoverflow_site__parsing/print__datetime_utc_and_reputation_change__with_missing_dates.py | 00e9926585256ee0385b09771cb3e87d0bf1e62c | [
"CC-BY-4.0"
] | permissive | stepik/SimplePyScripts | 01092eb1b2c1c33756427abb2debbd0c0abf533f | 3259d88cb58b650549080d6f63b15910ae7e4779 | refs/heads/master | 2023-05-15T17:35:55.743164 | 2021-06-11T22:59:07 | 2021-06-11T22:59:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,007 | py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = 'ipetrash'
import datetime as DT
def generate_range_dates(start_date, end_date) -> list:
date_1 = min(start_date, end_date)
date_2 = max(start_date, end_date)
# Сразу добавляем стартовую дату
items = [date_1]
while date_1 < date_2:
... | [
"ilya.petrash@inbox.ru"
] | ilya.petrash@inbox.ru |
4bdba1ed302a07e95891189723cb8e02be46a173 | 8806a17d66d7abb8434c879215dc09cbfc3b5a25 | /bin/log.py | 02e6764c09facc7e70ec062e7792b50d468208ef | [] | no_license | chenrun666/JW_purchase | f23d1719f447be669134c8fc02b1b8fd9d82cba8 | 9552920259f4014a08b38db88d0d48f0864822d3 | refs/heads/master | 2020-04-25T20:44:06.403805 | 2019-03-09T10:05:19 | 2019-03-09T10:05:19 | 173,057,863 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,963 | py | # coding:utf-8
import logging
from logging.handlers import RotatingFileHandler # 按文件大小滚动备份
import colorlog # 控制台日志输入颜色
import time
import datetime
import os
cur_path = os.path.dirname(os.path.realpath(__file__)) # log_path是存放日志的路径
log_path = os.path.join(os.path.dirname(cur_path), 'logs')
if not os.path.exists(log_... | [
"17610780919@163.com"
] | 17610780919@163.com |
76f0db3ff3eb3950c75953ea5619bbcd4e1ee88c | 113bfeda578324908963307670718c5545f30e8b | /booksite/booksite/book/migrations/0011_auto_20171205_1611.py | c4e55389b90cee0a19f1960233318db14ed070c8 | [
"Apache-2.0"
] | permissive | tkliuxing/bookspider | f0989814716e38fa081cc300f92fc975ff8ac67d | bc7ba487f0ab6ea7782f5093bb1d074eac662bdf | refs/heads/master | 2021-01-18T23:31:26.566892 | 2020-03-14T04:04:48 | 2020-03-14T04:04:48 | 21,845,464 | 40 | 36 | null | 2015-11-06T03:58:04 | 2014-07-15T03:51:01 | CSS | UTF-8 | Python | false | false | 426 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.9.8 on 2017-12-05 08:11
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('book', '0010_auto_20171205_1436'),
]
operations = [
migrations.AlterUniqueTogether(
... | [
"ouyanghongyu@gmail.com"
] | ouyanghongyu@gmail.com |
e51ce24cc9abf704617483f76ca2cd74285aeb65 | 5b93930ce8280b3cbc7d6b955df0bfc5504ee99c | /nodes/VanderPlas17Python/E_Chapter4/N_ThreeDimensionalPlotting/A_ThreeDimensionalPoints/index.py | 0b8df9722eaab651824247c3bb62acae5f54c7eb | [] | no_license | nimra/module_gen | 8749c8d29beb700cac57132232861eba4eb82331 | 2e0a4452548af4fefd4cb30ab9d08d7662122cf4 | refs/heads/master | 2022-03-04T09:35:12.443651 | 2019-10-26T04:40:49 | 2019-10-26T04:40:49 | 213,980,247 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 4,466 | py | # Lawrence McAfee
# ~~~~~~~~ import ~~~~~~~~
from modules.node.HierNode import HierNode
from modules.node.LeafNode import LeafNode
from modules.node.Stage import Stage
from modules.node.block.CodeBlock import CodeBlock as cbk
from modules.node.block.HierBlock import HierBlock as hbk
from modules.node.block.ImageBlock ... | [
"lawrence.mcafee@gmail.com"
] | lawrence.mcafee@gmail.com |
8a501952490fa9d33985f24cf23aa7cb69298554 | 452be58b4c62e6522724740cac332ed0fe446bb8 | /src/starboard/android/shared/gyp_configuration.gypi | 12dd79875f4d6246ee3cd44f16732f163bbd4628 | [
"Apache-2.0"
] | permissive | blockspacer/cobalt-clone-cab7770533804d582eaa66c713a1582f361182d3 | b6e802f4182adbf6a7451a5d48dc4e158b395107 | 0b72f93b07285f3af3c8452ae2ceaf5860ca7c72 | refs/heads/master | 2020-08-18T11:32:21.458963 | 2019-10-17T13:09:35 | 2019-10-17T13:09:35 | 215,783,613 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 4,374 | gypi | # Copyright 2016 The Cobalt Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | [
"trofimov_d_a@magnit.ru"
] | trofimov_d_a@magnit.ru |
6914467b4e480fb1fed13898dda10452a6241fef | 51b6d2fc53d5c632fcf01319842baebf13901e84 | /atcoder.jp/arc032/arc032_1/Main.py | 66bb6d66546bb0ff6cd9f30580c3f42ba9e3c722 | [] | no_license | mono-0812/procon | 35db3b2c21eff74fbd7b52db07f249380f6834ef | 68a4b53880a228a0164052b23d1326363efcbc20 | refs/heads/master | 2023-05-30T17:02:58.935074 | 2021-06-27T12:15:10 | 2021-06-27T12:15:10 | 345,896,553 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 188 | py | n = int(input())
val = 0
for i in range(1,n+1):
val += i
for i in range(2,val//2):
if val%i == 0:
print("BOWWOW")
exit()
if val == 1:
print("BOWWOW")
exit()
print("WANWAN") | [
"frisk02.jar@gmail.com"
] | frisk02.jar@gmail.com |
8e0ec5c953585aa962691f0bce2d260c8e78caa8 | 11c036911cf893325199d9e9a91a11cd1dca7c90 | /all-paths-from-source-to-target/solution.py | 1fd9a15570b8173bfb5bd501c9d9b6d36d73959b | [] | no_license | arpiagar/HackerEarth | 34f817f69e94d88657c1d8991a55aca302cdc890 | 4a94f1b11a353ab6b2837a1ac77bfbd7c91f91d2 | refs/heads/master | 2021-07-18T14:23:05.124943 | 2021-02-09T21:58:12 | 2021-02-09T21:58:12 | 19,204,412 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 640 | py | #https://leetcode.com/problems/all-paths-from-source-to-target/submissions/
class Solution:
def allPathsSourceTarget(self, graph: List[List[int]]) -> List[List[int]]:
adj_map ={}
for i in range(len(graph)):
adj_map[i] = graph[i]
start = 0
out = []
self.findpath(... | [
"arpit.agarwal@booking.com"
] | arpit.agarwal@booking.com |
43caf1de2da7fac86bcfdb234a60cee558ff0e0a | 7d23056a789ded9ff2b9e14f9c57e59295cdfd6d | /samples/src/com/zoho/crm/api/initializer/init.py | e6722a40d14a4971a467de5fc2f5fd8877382104 | [] | no_license | L1nuxFNC/zohocrm-python-sdk | 2e825fe4d7c6fb1374a5747cbd1e39b0dd4b706d | bba7328de07b137d2cb6e2aac31b8f57e0803026 | refs/heads/master | 2023-06-05T09:17:35.549980 | 2021-05-13T12:45:59 | 2021-05-13T12:45:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,893 | py | from zcrmsdk.src.com.zoho.crm.api.user_signature import UserSignature
from zcrmsdk.src.com.zoho.crm.api.dc import INDataCenter, USDataCenter, EUDataCenter, CNDataCenter, AUDataCenter
from zcrmsdk.src.com.zoho.api.authenticator.store import DBStore, FileStore
from zcrmsdk.src.com.zoho.api.logger import Logger
from zcrms... | [
"aswinkumar.m@zohocorp.com"
] | aswinkumar.m@zohocorp.com |
dd6398e4756bc1d70633d09a2c01a4591bf45d5a | dc99d95671170444cd7bf02e37da6ecda4a5f19e | /apps/courses/forms.py | 7c3607216ee4eed7c75516ebceebca0b96f618d5 | [] | no_license | bbright3493/python_real_war | 734d49ed9f7e1800d24dc754424a07b69d7d8c1f | 6e43bb7d814920222f3310bd6fd9f04cb3d5bbf1 | refs/heads/master | 2020-03-30T06:08:40.249185 | 2018-10-22T07:33:41 | 2018-10-22T07:33:41 | 150,841,381 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 358 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 18-5-7 上午10:05
# @Author : Ztsong
from django import forms
from .models import ProgramUpload
#
# class ProgramUploadForm(forms.ModelForm):
# class Meta:
# model = ProgramUpload
# fields = ['image']
class ProgramUploadForm(forms.Form):
... | [
"44704708@qq.com"
] | 44704708@qq.com |
ec626fcce05227e389111ecdb0c34538cbe6e418 | 0090756d7a6eb6ab8389ad23b20e89cd68dbd0e4 | /배열insert.py | b895832beb6bb14ce872d0f5f7be1610194d477c | [] | no_license | ssh6189/2019.12.16 | 5c3093e03ac793d5f0a93cf99e78c6483fcee6d8 | c1021bb72b3fdc05d7f5e8ae350bbd6eee65b0d3 | refs/heads/master | 2020-12-13T19:19:04.558270 | 2020-01-17T08:47:04 | 2020-01-17T08:47:04 | 234,507,219 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 396 | py | import numpy as np
a = np.arange(1, 10).reshape(3,3)
print(a)
#a 배열을 일차원 ㅐ열로 변환하고 1번 index에 99추가
np.insert(a, 1, 999)
#a배열의 axis 0방향 1번 인덱스에 추가
#인덱스가 1인 row에 999가 추가됨
np.insert(a, 1, 999, axis=0)
#a배열의 axis 1방향 1번 인덱스에 추가
#index가 1인 column에 999가 추가됨
np.insert(a, 1, 999, axis=1)
| [
"ssh6189@naver.com"
] | ssh6189@naver.com |
44685fe6f9efa4068a850e9767859e5f04694261 | 1564d12d61f669ce9f772f3ef7563167f7fe13bf | /codeforces/606/B.MakeThemOdd.py | 9c2d937efa9b206dced25914e93f323bacc2266a | [] | no_license | sakshamk6999/codingPractice | 73ec4873defb0f0d2e47173150a589ee12e5e0a1 | f727aac6d87448b19fc9d48660dc6978fe5edc14 | refs/heads/master | 2020-12-01T20:22:36.299535 | 2020-02-04T05:55:53 | 2020-02-04T05:55:53 | 230,757,937 | 0 | 0 | null | 2020-02-12T20:38:12 | 2019-12-29T14:00:22 | Python | UTF-8 | Python | false | false | 849 | py | from collections import defaultdict
import heapq
for _ in range(int(input())):
n = int(input())
rec = {}
rec = defaultdict(lambda : 0, rec)
a = sorted(list(map(int, input().split())))
e = []
l = 0
for i in a:
if i % 2 == 0 and rec[-1 * i] == 0:
e.append(-1 * i)
... | [
"sakshamkhatwani@gmail.com"
] | sakshamkhatwani@gmail.com |
0d00be6ffa67dcb44dadf1e7fb59c96d3cefdc76 | dabc9c7ec7cce125a12c6243ff67fd91e620d636 | /tap/tests/test_pytest_plugin.py | c91e8b40631e9c79c21ada77df44a0db95c9ba65 | [
"BSD-3-Clause",
"BSD-2-Clause"
] | permissive | Mark-E-Hamilton/tappy | 7634209c2862c9e837b58602d4b59636fd9a8e89 | 62c1a4ef1d9e724d3c7bbb31361c17c3bf071d04 | refs/heads/master | 2021-01-15T09:04:09.813683 | 2016-03-21T04:51:45 | 2016-03-21T04:51:45 | 53,630,217 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,332 | py | # Copyright (c) 2016, Matt Layman
try:
from unittest import mock
except ImportError:
import mock
import tempfile
from tap.plugins import _pytest
from tap.tests import TestCase
from tap.tracker import Tracker
class TestPytestPlugin(TestCase):
def setUp(self):
"""The pytest plugin uses module sco... | [
"matthewlayman@gmail.com"
] | matthewlayman@gmail.com |
e36cba2db79f18ed6432af22f03c4f53dd4f61b1 | 2dfbb97b47fd467f29ffb26faf9a9f6f117abeee | /leetcode/242.py | 0b7a2589d14a456369352fe3820fb247d6675b0b | [] | no_license | liuweilin17/algorithm | 0e04b2d36dfb6b7b1b0e0425daf69b62273c54b5 | d3e8669f932fc2e22711e8b7590d3365d020e189 | refs/heads/master | 2020-12-30T11:03:40.085105 | 2020-04-10T03:46:01 | 2020-04-10T03:46:01 | 98,844,919 | 3 | 1 | null | 2018-10-05T03:01:02 | 2017-07-31T03:35:14 | C++ | UTF-8 | Python | false | false | 1,014 | py | ###########################################
# Let's Have Some Fun
# File Name: 242.py
# Author: Weilin Liu
# Mail: liuweilin17@qq.com
# Created Time: Fri Oct 19 00:40:47 2018
###########################################
#coding=utf-8
#!/usr/bin/python
# valid anagram
class Solution(object):
def isAnagram(self, s, ... | [
"liuweilin17@qq.com"
] | liuweilin17@qq.com |
7eacb9ca621e2a660599a473bfdbc1136d01a7a6 | 487ce91881032c1de16e35ed8bc187d6034205f7 | /codes/CodeJamCrawler/16_0_1/bbbeebun/codejam_01.py | 7a489d790a6fd40192e6c72e498da86daa2ff2b1 | [] | no_license | DaHuO/Supergraph | 9cd26d8c5a081803015d93cf5f2674009e92ef7e | c88059dc66297af577ad2b8afa4e0ac0ad622915 | refs/heads/master | 2021-06-14T16:07:52.405091 | 2016-08-21T13:39:13 | 2016-08-21T13:39:13 | 49,829,508 | 2 | 0 | null | 2021-03-19T21:55:46 | 2016-01-17T18:23:00 | Python | UTF-8 | Python | false | false | 1,308 | py | def has_completed(mapping):
count = 0
for key in mapping:
count += mapping[key]
if count == 10:
return True
else:
return False
def update_mapping(current_n, mapping):
current_n_str = str(current_n)
for each in current_n_str:
if mapping[each] == 0:
mapping[each] = 1
def counting_sheep(n):
if n ==... | [
"[dhuo@tcd.ie]"
] | [dhuo@tcd.ie] |
08d60b0fdf4f6abfda5e2ac10591021283fc44bf | 8e1be167066e30eff91c26c0757211cf3cf8b016 | /django/orm/book_authors_proj/apps/books_authors_app/migrations/0001_initial.py | 5818682c02c3c18e31b135482e2c1adb636304db | [] | no_license | dojo-solutions/online-ft-python | 074d0ba968f5a77eaec1bca0904232f2aa29051a | b4f6941d0bba376d121a40a6429b815d5b03c32f | refs/heads/master | 2020-04-21T11:52:31.390772 | 2019-03-02T01:27:54 | 2019-03-02T01:27:54 | 169,542,448 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,422 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2019-02-21 18:01
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Author',... | [
"wes@tao.team"
] | wes@tao.team |
2ba20372fe4994021d5cf6e43c9b163c1c106b64 | 05a9e0bb7e33099f94dfc8af53b4837bc5c9d287 | /python/ext_examples/torch/bench/linear.py | 1a840cbd0db9eba60313d59db7025e1b6a7852df | [] | no_license | HiroIshida/snippets | 999c09efadae80397cb82a424328bb1dbda4915f | f64dcd793184be64682b55bdaee7392fd97a0916 | refs/heads/master | 2023-09-01T08:18:42.523625 | 2023-09-01T04:08:20 | 2023-09-01T04:08:20 | 207,662,767 | 7 | 2 | null | 2022-08-01T23:20:42 | 2019-09-10T21:04:01 | C++ | UTF-8 | Python | false | false | 782 | py | import torch.nn as nn
import tqdm
import numpy as np
import matplotlib.pyplot as plt
import time
import torch
import threadpoolctl
def measure_perf(depth, with_grad: bool = False):
lst = []
for _ in range(depth):
lst.append(nn.Linear(40, 40))
lst.append(nn.ReLU())
lst.append(nn.Linear(40, 1... | [
"spitfire.docomo@gmail.com"
] | spitfire.docomo@gmail.com |
b5ed3013b2eafda68318a223d46dce0287cafaff | 32fdc94d1b8d98085db5d1e8caae4161d3e70667 | /3rd_party/python3.7/lib/python3.7/site-packages/mining-0.2.2-py3.7-linux-x86_64.egg/mining/utils/listc.py | 298f9060e40d10832fcab747bdea37497e80d1e6 | [
"Python-2.0"
] | permissive | czfdlut/ticket_proxy | fa0f1924a86babfa7ce96cf97e929f7bf78643b7 | 0d7c19448741bc9030484a97c1b8f118098213ad | refs/heads/master | 2022-12-23T05:25:58.207123 | 2019-11-20T03:58:31 | 2019-11-20T03:58:31 | 174,579,562 | 1 | 3 | null | 2022-12-18T01:18:07 | 2019-03-08T17:22:48 | Python | UTF-8 | Python | false | false | 310 | py | def __bootstrap__():
global __bootstrap__, __loader__, __file__
import sys, pkg_resources, imp
__file__ = pkg_resources.resource_filename(__name__, 'listc.cpython-37m-x86_64-linux-gnu.so')
__loader__ = None; del __bootstrap__, __loader__
imp.load_dynamic(__name__,__file__)
__bootstrap__()
| [
"czfdlut@163.com"
] | czfdlut@163.com |
32fb9a2a330ac6fa993cae29751e0c894fb2e922 | 1af44bdcbc3c15d3f6e436a7924dfd45f504ab3a | /01.jump to python/chpter 2/62em.py | 4db6566d344540379fdc05693d0ca4cb074461b8 | [] | no_license | wql7654/bigdata_exam | f57c8b475690cbc5978009dbf8008bedff602e2a | c07ee711bb84407428ba31165185b9607b6825e8 | refs/heads/master | 2023-04-07T00:50:59.563714 | 2021-05-25T02:46:43 | 2021-05-25T02:46:43 | 180,915,985 | 0 | 0 | null | 2023-03-25T01:08:09 | 2019-04-12T02:36:08 | Jupyter Notebook | UTF-8 | Python | false | false | 191 | py |
a=['life','is','too','hard']
re=" ".join(a)
print(re)
re=re.split()
print(re)
re=','.join(a)
print(re)
re=re.split(',')
print(re)
re.sort()
print(re)
re=" ".join(re)
print(re)
| [
"studerande5@gmail.com"
] | studerande5@gmail.com |
ede66e2d33e041a80cec2a8771ccc87fe440f7af | de24f83a5e3768a2638ebcf13cbe717e75740168 | /moodledata/vpl_data/148/usersdata/268/99980/submittedfiles/testes.py | c1a570ae015ca648546489e96edebf5c24b3fe5c | [] | 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 | 142 | py | # -*- coding: utf-8 -*-
n=int(input('ooo'))
i=0
while i*(i+1)*(i+2) < n:
i=i+1
if i*(i+1)*(i+2)==n:
print('S')
else :
print('N')
| [
"rafael.mota@ufca.edu.br"
] | rafael.mota@ufca.edu.br |
60c93a4684a8e005d11c1dc1ee26fb60e25dd162 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03393/s891507939.py | 38993f4b41b75bc140544df5c2618f773831c0e9 | [] | 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 | 463 | py | s = input()
c = list(s)
c2 = set(c)
al = sorted(list("qwertyuiopasdfghjklzxcvbnm"))
#26文字未満なら追加
if len(c)<26:
for i in range(26):
if al[i] not in c2:
print(s+al[i])
exit()
if s == "zyxwvutsrqponmlkjihgfedcba":
print(-1)
exit()
rev = "zyxwvutsrqponmlkjihgfedcba"
for i in ra... | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
ebbc9f436c2f66f730686c9789e0cb9cb7aa1ee8 | 5ac72c8484d8b7c2ecb94217e70ffa96c8c83053 | /server/account/models.py | 0661b22685cb7c013e9dce0dd4cb818a1fc07399 | [
"MIT"
] | permissive | buffalos0721/Super-Neutron-Drive | 975b6a9d20f9dc28d85632f87f50dd37da199f1f | d3cbeeae113722099032fb651dd4148670cb86e9 | refs/heads/master | 2020-03-26T08:40:40.409045 | 2016-08-18T16:20:36 | 2016-08-18T16:20:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,280 | py | import urllib
import datetime
from importlib import import_module
from collections import OrderedDict
from django.db import models
from django.conf import settings
from django.utils import timezone
from django.core import validators
from django.contrib.auth.models import AbstractBaseUser, PermissionsMixin, UserManager... | [
"paul.m.bailey@gmail.com"
] | paul.m.bailey@gmail.com |
d8e1b1e542edb43a01bb810371c9af69a80d601c | 1e4d2a66f92b8ef3baddaf76366c1be4ad853328 | /Safari_Edris_DSC510/SandBox/ImportFiles/venv/Scripts/pip3-script.py | d8f7812de43586a23f66d5e0a7f99db0e1b9abc4 | [] | no_license | dlingerfelt/DSC-510-Fall2019 | 0c4168cf030af48619cfd5e044f425f1f9d376dd | 328a5a0c8876f4bafb975345b569567653fb3694 | refs/heads/master | 2022-12-04T05:04:02.663126 | 2022-11-28T14:58:34 | 2022-11-28T14:58:34 | 204,721,695 | 5 | 23 | null | 2019-12-06T01:15:11 | 2019-08-27T14:30:27 | Python | UTF-8 | Python | false | false | 463 | py | #!C:\Users\safar\Documents\GitHub\DSC-510-Fall2019\Safari_Edris_DSC510\SandBox\ImportFiles\venv\Scripts\python.exe
# EASY-INSTALL-ENTRY-SCRIPT: 'pip==19.0.3','console_scripts','pip3'
__requires__ = 'pip==19.0.3'
import re
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.argv[0] ... | [
"54446804+safarie1103@users.noreply.github.com"
] | 54446804+safarie1103@users.noreply.github.com |
2bb14a82bf0195f215a36c5e10aef5136ef02006 | facb8b9155a569b09ba66aefc22564a5bf9cd319 | /wp2/era5_scripts/02_preprocessing/combine82/35-tideGauge.py | c363a79bc5b9cbdedc37466360109e92883f0129 | [] | no_license | moinabyssinia/modeling-global-storm-surges | 13e69faa8f45a1244a964c5de4e2a5a6c95b2128 | 6e385b2a5f0867df8ceabd155e17ba876779c1bd | refs/heads/master | 2023-06-09T00:40:39.319465 | 2021-06-25T21:00:44 | 2021-06-25T21:00:44 | 229,080,191 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,115 | py | # -*- coding: utf-8 -*-
"""
Created on Tue Apr 16 16:11:00 2020
--------------------------------------------
Load predictors for each TG and combine them
--------------------------------------------
@author: Michael Tadesse
"""
import os
import pandas as pd
#define directories
dir_in = '/lustre/fs0/home/mtadesse/er... | [
"michaelg.tadesse@gmail.com"
] | michaelg.tadesse@gmail.com |
ea48d2765c2ca0ae7d26e05b899fc93cb13349ec | e42a61b7be7ec3412e5cea0ffe9f6e9f34d4bf8d | /a10sdk/core/system/system_bfd_stats.py | 2b13f0d88b617ea5ea2c93a905d0181004463e88 | [
"Apache-2.0"
] | permissive | amwelch/a10sdk-python | 4179565afdc76cdec3601c2715a79479b3225aef | 3e6d88c65bd1a2bf63917d14be58d782e06814e6 | refs/heads/master | 2021-01-20T23:17:07.270210 | 2015-08-13T17:53:23 | 2015-08-13T17:53:23 | 40,673,499 | 0 | 0 | null | 2015-08-13T17:51:35 | 2015-08-13T17:51:34 | null | UTF-8 | Python | false | false | 4,388 | py | from a10sdk.common.A10BaseClass import A10BaseClass
class Stats(A10BaseClass):
"""This class does not support CRUD Operations please use parent.
:param udp_checksum_error: {"optional": true, "size": "2", "type": "number", "oid": "2", "format": "counter"}
:param invalid_detect_mult: {"optional": true... | [
"doug@parksidesoftware.com"
] | doug@parksidesoftware.com |
c1bb69c3c89f7e74c5290bc657be0da088c70345 | 13696a9691b173d75b11b4aee22b79d4ea6b7c0b | /test/test_o_auth_api.py | 760055ebca9f7d8f8ae0f95734aad1999bf0caef | [
"Apache-2.0"
] | permissive | square/connect-python-sdk | 410613bc4b04f0f70176275591a16c9e49e25ede | e00e2889b2dd2c55048219cbe64db79962a68633 | refs/heads/master | 2023-06-15T09:24:17.190416 | 2019-08-15T17:44:41 | 2019-08-15T17:44:41 | 64,772,029 | 53 | 45 | Apache-2.0 | 2020-12-20T18:41:31 | 2016-08-02T16:07:17 | Python | UTF-8 | Python | false | false | 1,346 | py | # coding: utf-8
"""
Copyright 2017 Square, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable la... | [
"noreply@github.com"
] | square.noreply@github.com |
0ad4839cc902ab89f8ee4c25b4c3fbf598f4798a | 8881a4927d893e1e755c0488f76ba7941b379f26 | /tech_gram_project2/producthunt_project/producthunt_project/urls.py | 01b11efd49f26851698655f127f6afdfa499ab26 | [] | no_license | SatishNitk/Django | 6bb839fcf2bc7d70413e3d56ac98124a7a96a5de | d9260c032322a34410d783c39a8f13e8f63b8be4 | refs/heads/master | 2020-05-24T23:01:35.767388 | 2019-07-06T13:56:50 | 2019-07-06T13:56:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 418 | py | from django.contrib import admin
from django.urls import path,include
from django.conf.urls.static import static
from django.conf import settings
urlpatterns = [
path('admin/', admin.site.urls),
path('product/', include("products.urls")),
path('account/', include("accounts.urls"))
] + static(settings.MEDI... | [
"satishkrgu95@gmail.com"
] | satishkrgu95@gmail.com |
faf7637b93bf57c9d86f6f84ec0dc2f5c276cca2 | 994ea22f35c635fdf139af9282b0d3a3d86ea34a | /ud617-intro_to_hadoop_mapreduce/lesson6/part1/reducer_q3.py | d3be0e7c6127a7fdf196f92e9b3177b5ef9970aa | [] | no_license | zjyx147/Udacity | ac371fbc5b5b456e88b411657ef5a28c3b071c6c | d86fadd537dbacc6f8142b043e71527b0448bae3 | refs/heads/master | 2022-06-23T14:25:41.242353 | 2019-06-20T20:12:13 | 2019-06-20T20:12:13 | 191,207,247 | 0 | 0 | null | 2022-06-21T22:07:35 | 2019-06-10T16:42:18 | DIGITAL Command Language | UTF-8 | Python | false | false | 593 | py | #!/usr/bin/python
import sys
totalNum = 0
totalVal = 0
oldKey = None
# Loop around the data
# It will be in the format key\tval
# Where key is the store name, val is the sale amount
#
# All the sales for a particular store will be presented,
# then the key will change and we'll be dealing with the next store
for li... | [
"zjyx147@gmail.com"
] | zjyx147@gmail.com |
cf62c539355e00b0778c2edcea0d321f0c331db4 | f719fb52b2fee32742c62e0267633a68c228d982 | /2017-03-29/gen3.py | 3394a05273741324057417acd390b15bacc994bb | [] | no_license | elsys/python2016-2017 | 76e0fcb97b509a6f87fd010479b44ee702d7b2dd | 290ba35dc1242a9f13a320ada1ec0498acc8fb79 | refs/heads/master | 2021-06-18T08:07:12.025390 | 2017-06-14T15:41:12 | 2017-06-14T15:41:12 | 83,579,817 | 3 | 2 | null | null | null | null | UTF-8 | Python | false | false | 253 | py |
def fun(v):
print("calling fun() with value v=", v)
return 2*v
# print(fun(1))
def gen(maxv):
while maxv > 0:
print("before yield")
yield fun(maxv)
maxv -= 1
g = gen(3)
print(next(g))
# print(next(g))
"""
for v in g:
print(v)
"""
| [
"lubomir.chorbadjiev@gmail.com"
] | lubomir.chorbadjiev@gmail.com |
cb2ad544ec354652fc3ec9b093ddbc618597cd18 | 44badce6303eb8df34707edf27c5f8f2d2bc2697 | /redfoot-1.6/lib/redfootlib/rdf/model/schema.py | 2e583d06866efeaa30576f5f9794e1023a1d9554 | [] | no_license | jtauber/redfoot-orig | d371456f79e8b584f8e58037a5ab33011027484a | a5c26c53ba94c6d8970578bfcbc637aafaad1e11 | refs/heads/master | 2021-01-13T01:13:24.072000 | 2014-06-22T14:58:45 | 2014-06-22T14:58:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,998 | py | from __future__ import generators
from redfootlib.rdf.model.core import Core
from redfootlib.rdf.const import LABEL, COMMENT
from redfootlib.rdf.const import TYPE, STATEMENT
from redfootlib.rdf.const import SUBJECT, PREDICATE, OBJECT
from redfootlib.rdf.const import DOMAIN, SUBCLASSOF
class Schema(Core):
def l... | [
"eikeon@eikeon.com"
] | eikeon@eikeon.com |
9cc6d69a4edce9161dbfdc879d96259cff1bacef | 5be8b0f2ee392abeee6970e7a6364ac9a5b8ceaa | /xiaojian/first_phase/day06/exersice03.py | e8b14b51849de9acde1b36a099be0ce424888398 | [] | no_license | Wellsjian/20180826 | 424b65f828f0174e4d568131da01dafc2a36050a | 0156ad4db891a2c4b06711748d2624080578620c | refs/heads/master | 2021-06-18T12:16:08.466177 | 2019-09-01T10:06:44 | 2019-09-01T10:06:44 | 204,462,572 | 0 | 1 | null | 2021-04-20T18:26:03 | 2019-08-26T11:38:09 | JavaScript | UTF-8 | Python | false | false | 691 | py | # 在控制台中选取季度,并将相应月份打印出来
# season = input("请输入季度:")
# if season == "春":
# print("该季度有1 2 3 月份")
# elif season == "夏":
# print("该季度有4 5 6 月份")
# elif season == "秋":
# print("该季度有7 8 9 月份")
# elif season == "冬":
# print("该季度有10 11 12 月份")
# else:
# print("您的输入不合法")
season = input("请输入季度:")
season_d... | [
"1149158963@qq.com"
] | 1149158963@qq.com |
bc96195975a91b5368e14f03c4909420a70a4ac3 | 65bf0113da75390c4cf3960b6a409aca15569a06 | /tests/migrations/0014_apply_report_file.py | e3afd0e4e25db2a852b10394c22262f44c292c82 | [] | no_license | wenpengfan/opsadmin | e7701538265253653adb1c8ce490e0ce71d3b4f6 | 3d997259353dc2734ad153c137a91f3530e0a8ec | refs/heads/master | 2023-03-29T11:50:10.756596 | 2020-11-16T02:41:18 | 2020-11-16T02:41:18 | 313,171,594 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 513 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.20 on 2020-06-01 13:31
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('tests', '0013_apply_feedback'),
]
operations = [
migrations.AddField(
... | [
"you@example.com"
] | you@example.com |
0d9a7d280e51e2933b55ef5fd026a4939f72886c | f38e78214992de722a6ec2012e844bce7b3c59ed | /bin/taskwarrior | 25c78d0f0862d46f2f10288152304e2e7cfef0a4 | [
"MIT"
] | permissive | clckwrkbdgr/dotfiles | 20fb86f54d93ae4936c334898c3d7b1b3820fb06 | a7e880e189bfa4793f30ff928b049e4a182a38cd | refs/heads/master | 2023-08-31T13:13:47.533868 | 2023-08-30T18:32:00 | 2023-08-30T18:32:00 | 20,396,084 | 2 | 2 | MIT | 2022-10-01T16:35:31 | 2014-06-02T07:26:38 | Python | UTF-8 | Python | false | false | 1,716 | #!/usr/bin/env python
import logging
import functools
logger = logging.getLogger('taskwarrior')
from clckwrkbdgr import utils
import clckwrkbdgr.taskwarrior
from clckwrkbdgr.taskwarrior import TaskWarrior, Config
import clckwrkbdgr.logging
import click, click_default_group
import clckwrkbdgr.click
@functools.lru_cach... | [
"umi0451@gmail.com"
] | umi0451@gmail.com | |
5b2abe106d6315f4695312f7040b4d674324543f | 6515dee87efbc5edfbf4c117e262449999fcbb50 | /eet/Merge_k_Sorted_Lists.py | a79231a7a08f8900b10c642d099fb90026c69498 | [] | no_license | wangyunge/algorithmpractice | 24edca77e180854b509954dd0c5d4074e0e9ef31 | 085b8dfa8e12f7c39107bab60110cd3b182f0c13 | refs/heads/master | 2021-12-29T12:55:38.096584 | 2021-12-12T02:53:43 | 2021-12-12T02:53:43 | 62,696,785 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,102 | py | """
Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity.
Example:
Input:
[
1->4->5,
1->3->4,
2->6
]
Output: 1->1->2->3->4->4->5->6
"""
# Definition for singly-linked list.
# class ListNode(object):
# def __init__(self, val=0, next=None):
# self.val = va... | [
"wangyunge1@yahoo.com"
] | wangyunge1@yahoo.com |
ebf05022393496f5a3c2690de8595fb5f621a652 | fcfb3f5e94f35aa0d7c5632efec1d1c15d66e856 | /day9/flask_day3/inherit_demo/app.py | 826748d83c0c62228ad9455de8a5457081fe0b4b | [
"Apache-2.0"
] | permissive | gaohj/wh1904js | 98a9d1dd63d42766b656f07ce537b5933eaafb78 | a3af38f8311f79eb9f2e08a3de16dd1e02c40714 | refs/heads/master | 2021-07-11T17:16:49.885524 | 2020-01-17T09:48:15 | 2020-01-17T09:48:15 | 232,022,360 | 0 | 0 | Apache-2.0 | 2021-03-20T02:41:32 | 2020-01-06T04:14:22 | JavaScript | UTF-8 | Python | false | false | 322 | py | from flask import Flask,render_template
from flask_script import Manager
app = Flask(__name__)
manager = Manager(app)
@app.route('/')
def hello_world():
return render_template('index.html')
@app.route('/detail/')
def details():
return render_template('detail.html')
if __name__ == '__main__':
manager.run(... | [
"gaohj@163.com"
] | gaohj@163.com |
569e5135fac1555cf0fb518269b99b2c71661cc5 | 2f98aa7e5bfc2fc5ef25e4d5cfa1d7802e3a7fae | /python/python_9477.py | fa57d72004d0e3842548a0d58e2499f639d33ab5 | [] | no_license | AK-1121/code_extraction | cc812b6832b112e3ffcc2bb7eb4237fd85c88c01 | 5297a4a3aab3bb37efa24a89636935da04a1f8b6 | refs/heads/master | 2020-05-23T08:04:11.789141 | 2015-10-22T19:19:40 | 2015-10-22T19:19:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 164 | py | # Django Testing: Using a login decorator for test cases
class SimpleTest(TestCase):
def setUp(self):
self.client.login(username='foo', password='bar')
| [
"ubuntu@ip-172-31-7-228.us-west-2.compute.internal"
] | ubuntu@ip-172-31-7-228.us-west-2.compute.internal |
52b1286ab48d460abebb87719f7d65cef1e7009d | c62a07c8051d6106717863651004c8186a0e3027 | /logic.py | 84c2678f81cea7f404f2c5b6faddd8b4b1335110 | [] | no_license | isakura313/third_22 | bf47bef5914ac5debeb33a36dad39566181ed6fb | c43911d6b73f638894d14f757a0ec5462e9e8005 | refs/heads/master | 2022-04-18T14:27:00.231299 | 2020-04-22T17:01:23 | 2020-04-22T17:01:23 | 257,967,272 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 425 | py | role = input("Введите вашу роль в проекте: ")
age = input("Введите ваш возраст: ")
age = int(age)
if role == "admin" and age > 18:
print("У вас есть все права")
elif role == "user" and age> 16:
print("У вас на этом проекте есть некоторые права")
else:
print(" этот сервис закрыт на карантин")
| [
"isakura313@gmail.com"
] | isakura313@gmail.com |
7953194e08d87e2cc8bd5e2a743dc383d4d6458b | fc3c9d2143aecedce191bb91dbd01babe7f6d40b | /tensorpack/callbacks/dump.py | ef62833b31118c6a9f00e80eb5e6c9216d57a65e | [
"Apache-2.0"
] | permissive | rahulbprakash/tensorpack | 0ee10de245f486d17a252354833c98dd713fd6e6 | b2ec42a8d152760498aa911818d50b01e408bb43 | refs/heads/master | 2020-12-30T19:12:08.800662 | 2016-06-09T23:03:37 | 2016-06-09T23:03:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,077 | py | # -*- coding: UTF-8 -*-
# File: dump.py
# Author: Yuxin Wu <ppwwyyxx@gmail.com>
import os
import scipy.misc
from scipy.misc import imsave
import numpy as np
from .base import Callback
from ..utils import logger
from ..tfutils import get_op_var_name
__all__ = ['DumpParamAsImage']
class DumpParamAsImage(Callback):
... | [
"ppwwyyxxc@gmail.com"
] | ppwwyyxxc@gmail.com |
9d3ebb55f1314362a215d95a4aadf6a840bf824d | 1b9075ffea7d4b846d42981b41be44238c371202 | /2009/stable/hardware/firmware/flashrom/actions.py | 870e4cb6e12699846f65a6f0b2a8ad85380f45fd | [] | no_license | pars-linux/contrib | bf630d4be77f4e484b8c6c8b0698a5b34b3371f4 | 908210110796ef9461a1f9b080b6171fa022e56a | refs/heads/master | 2020-05-26T20:35:58.697670 | 2011-07-11T11:16:38 | 2011-07-11T11:16:38 | 82,484,996 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 457 | py | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright 2007-2010 TUBITAK/UEKAE
# Licensed under the GNU General Public License, version 2.
# See the file http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
from pisi.actionsapi import autotools
from pisi.actionsapi import pisitools
def build():
autotools.make()
... | [
"necdetyucel@gmail.com"
] | necdetyucel@gmail.com |
22af9c136349ee70da4d000c5eef00cb1baf0109 | 8ecd899a8558ad0a644ecefa28faf93e0710f6fb | /ABC007/ABC007_A.py | 679623e243c760e493ba9bd56ca1c2569cd69a61 | [] | no_license | yut-inoue/AtCoder_ABC | b93885547049788d452e86b442a4a9f5ee191b0e | 3d2c4b2b2f8871c75f86040ad07ccd7736ad3dbe | refs/heads/master | 2021-07-03T09:09:20.478613 | 2021-02-21T13:20:31 | 2021-02-21T13:20:31 | 227,140,718 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 152 | py | n = int(input())
#a, b = map(int,input().split())
#l = list(map(int,input().split()))
#l = [list(map(int,input().split())) for i in range(n)]
print(n-1) | [
"yinoue.1996787@gmail.com"
] | yinoue.1996787@gmail.com |
2859050f5f4926044ceeb1a9937dfdf2a9332f07 | 3ec84a6e34f9bc709cb203f8b3f668f2b6697e2a | /python20200322-master/class_Python기초/py12패키지/mylib/operation/test.py | a8124c496932fed9a4168d433ceb4a82eeb59f3b | [] | no_license | eopr12/pythonclass | 52079bd99358ac73664beed236659b97c8b63d40 | 2526fe255969a799f6c534c9db6bff9e4eccd877 | refs/heads/master | 2022-07-10T11:17:31.692754 | 2020-05-16T08:43:00 | 2020-05-16T08:43:00 | 263,377,402 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 153 | py |
def test_operation():
result = None
try:
result = "test_operation"
except Exception as ex:
print(ex)
return result | [
"kye9565@gmail.com"
] | kye9565@gmail.com |
922ad653e03b85705765df9053e41ed4a995fcc9 | 7e3c7e9bf8e8410b688787bbf41f93e0bce30ef8 | /misc/fix_keras_optimizer.py | 4c1e72705ec6e77de0e31f5dd426bd7ffed1acef | [] | no_license | directorscut82/msthesis-experiments | bb8233d4e54da0b294b3a43f219bc424626e8ad5 | f86e344c972f2b61c3fa16eae523fd20303e8842 | refs/heads/master | 2020-03-23T08:24:19.535200 | 2017-07-27T06:23:18 | 2017-07-27T06:23:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 475 | py | #!/usr/bin/env python
"""
Make keras 1.x models usable in keras 2.x.
Run this when you get the following error:
ValueError: Optimizer weight shape (512,) not compatible with provided weight shape (32,)
"""
import glob
import h5py
model_files = sorted(glob.glob('*.h5'))
for model_file in model_files:
print("Upd... | [
"info@martin-thoma.de"
] | info@martin-thoma.de |
a515fc587646476cc8878bb50f72120b4e6aa5ba | bad85cd8d547a071baf4b6590f7e81d13ef1ec0d | /assistant/core/views.py | 2732966b89290e6982d4e90149bce48ffa294e63 | [
"MIT"
] | permissive | kapiak/ware_prod | 92e11671059642e14219d5aa8334e0564403db77 | ae61256890834c434d2e38cc2ccacf00b638665a | refs/heads/master | 2023-01-06T04:36:43.173093 | 2020-09-21T04:06:51 | 2020-09-21T04:06:51 | 310,320,165 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 871 | py | from typing import List
from django.contrib.auth.mixins import LoginRequiredMixin
from django.views.generic import TemplateView
from assistant.orders.models import Order
from assistant.products.models import Product
class DashboardViewMixin(LoginRequiredMixin):
title: str = None
breadcrumbs: List = []
... | [
"hamadeh.basel@gmail.com"
] | hamadeh.basel@gmail.com |
f7526d46e57dacaf54913613ea92feeddb67cffd | e34cbf5fce48f661d08221c095750240dbd88caf | /python/homework/day10_ansibleLike/core/verify.py | 70613c6ced9cebe0e42908774b56c4de14604d30 | [] | no_license | willianflasky/growup | 2f994b815b636e2582594375e90dbcb2aa37288e | 1db031a901e25bbe13f2d0db767cd28c76ac47f5 | refs/heads/master | 2023-01-04T13:13:14.191504 | 2020-01-12T08:11:41 | 2020-01-12T08:11:41 | 48,899,304 | 2 | 0 | null | 2022-12-26T19:46:22 | 2016-01-02T05:04:39 | C | UTF-8 | Python | false | false | 790 | py | #!/usr/bin/env python
# -*-coding:utf8-*-
# __author__ = "willian"
import getpass
from lib import mysql_helper
from conf.settings import *
def verify():
conn = mysql_helper.MySQLHandler(db_host, db_port, db_user, db_pass, db_name)
result = conn.select('select * from {0}', 'users')
count = 3
while c... | [
"284607860@qq.com"
] | 284607860@qq.com |
1f274d45c819c75e5909ef811396617f68af6e41 | 32271508e449e8842f38186e5e4528696b41d1f9 | /tabby/tab/migrations/0025_remove_race_win_market.py | 16142941a5e3532c0ac93d4c68b1aef608b2742a | [] | no_license | Tjorriemorrie/tabby | d623ad5be3ae53b9370fd400f362d940e7191ac3 | 09c697bd48fdc4de548c911f1fd81b2a7e4b511b | refs/heads/master | 2022-12-10T10:01:40.317751 | 2019-12-13T04:31:12 | 2019-12-13T04:31:12 | 100,076,546 | 4 | 2 | null | 2022-12-08T06:51:55 | 2017-08-11T23:26:00 | Jupyter Notebook | UTF-8 | Python | false | false | 326 | py | # Generated by Django 2.0.1 on 2018-01-30 01:00
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('tab', '0024_auto_20180128_1356'),
]
operations = [
migrations.RemoveField(
model_name='race',
name='win_market',
),
... | [
"jacoj82@gmail.com"
] | jacoj82@gmail.com |
21dae073458e0bac5899c85d1f117f88958119dc | fb78fd824e904705fb1ee09db8b3c20cc3902805 | /django-myshop/myshop/settings.py | e93a63838401dfb03886299b9b686dadf4dae54b | [] | no_license | Roderich25/mac | 8469833821ac49c539a744db29db5a41d755ad55 | 4f7fe281c88f0199b85d0ac99ce41ffb643d6e82 | refs/heads/master | 2023-01-12T05:55:12.753209 | 2021-11-26T01:16:24 | 2021-11-26T01:16:24 | 207,029,750 | 0 | 0 | null | 2023-01-07T11:49:23 | 2019-09-07T21:51:53 | Jupyter Notebook | UTF-8 | Python | false | false | 3,011 | py | import os
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/2.2/howto/deployment/checklist/
# SECURITY WARNING: keep the ... | [
"rodrigoavilasolis@gmail.com"
] | rodrigoavilasolis@gmail.com |
e350c375091476a2506c1e698410dc3a6adfbfb8 | 30f8afce1ba484183d8e1e14aae76cabb2d92354 | /pbase/day29/old.py | 741ae415c047f7297fc6ca49c5aab16131a342b0 | [] | no_license | brooot/Python_Base_Codes | d83e8c3b8a37b86672412c812fdb0d47deb67836 | a864685e160b5df4162a6f9fb910627eda702aaf | refs/heads/master | 2023-04-10T20:08:39.161289 | 2021-03-25T12:59:23 | 2021-03-25T12:59:23 | 200,570,412 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 790 | py | from socket import *
import sys
class FtpClient(object):
def __init__(self,serveraddr):
self.serveraddr=serveraddr
def do_list(self):
sockfd=socket()
sockfd.connect(self.ser)
def main():
if len(sys.argv)<3:
print('argv is error')
host=sys.argv[1]
port=int(sys.argv[2])... | [
"1442704671@qq.com"
] | 1442704671@qq.com |
c51c27f98dfdd33ed8055495236836b200efc808 | 93652e0f73558ffa24059647324f79ba043ba241 | /topi/tests/python/test_topi_bitserial_conv2d.py | 6df18483a45f9263f685e4ade3c425b75b29eb76 | [
"Apache-2.0"
] | permissive | souptc/tvm | 830b1444435b6bda267df305538a783eb687d473 | a8574e7bb814997cb3920a72035071899635b753 | refs/heads/master | 2020-03-25T12:42:20.686770 | 2018-08-06T21:07:38 | 2018-08-06T21:07:38 | 143,789,191 | 1 | 0 | Apache-2.0 | 2018-08-06T22:18:20 | 2018-08-06T22:18:19 | null | UTF-8 | Python | false | false | 4,821 | py | import os
import numpy as np
import tvm
import topi
import topi.testing
from tvm.contrib.pickle_memoize import memoize
from topi.util import get_const_tuple
from tvm.contrib import util
from tvm.contrib.pickle_memoize import memoize
def generate_quantized_np(shape, bits, out_dtype):
min_val = 0
max_val = 1 << ... | [
"tqchen@users.noreply.github.com"
] | tqchen@users.noreply.github.com |
3d1f1756528afaa87544ba2b6c62e67f3b6572f7 | b2c24abff86b28ca8a495b3a3c3227f070737aa2 | /parlai/agents/AdaND/utils.py | 2467ef5a277ddf9fdc24d14669efbf63843aff07 | [
"MIT"
] | permissive | hengyicai/AdaND | d5dda1b2fcd2abd17be6603de632f0515382b37b | 5e3fefb1cf40c42215a37246efc64958ae6db005 | refs/heads/master | 2023-09-01T07:38:49.076947 | 2020-10-19T04:58:00 | 2020-10-19T04:58:00 | 204,633,631 | 10 | 2 | MIT | 2023-08-11T19:52:23 | 2019-08-27T06:20:39 | Python | UTF-8 | Python | false | false | 947 | py | import torch.nn as nn
def reverse(lst):
return lst[::-1]
class FeedForward(nn.Module):
def __init__(self, input_dim, out_dim, hidden_sizes=(512,),
activation="Tanh", bias=True, dropout=0.1):
super(FeedForward, self).__init__()
self.activation = getattr(nn, activation)()
... | [
"caihengyi@ict.ac.cn"
] | caihengyi@ict.ac.cn |
fdef0e55fea15ec9925ee84443a708abafdfecc5 | 4a8775eac5a5f39400848b4c81476c49ddfbd871 | /apps/api-test/urls.py | a999262fcf5944dbfda9b7441dd035df4a93df14 | [] | no_license | wdudek82/quotarium-backend | ec6d73c13ed06a201066442f108cdbcc4777da5e | b37cbbe1a136f89fe10ed6d6418a69d585bec8ff | refs/heads/master | 2022-12-10T18:32:37.564838 | 2018-07-08T20:40:28 | 2018-07-08T20:40:28 | 140,035,629 | 0 | 0 | null | 2022-12-08T02:17:15 | 2018-07-06T22:39:13 | Python | UTF-8 | Python | false | false | 142 | py | from django.conf.urls import url
from .views import UserViewSet
urlpatterns = [
url(r'^users/$', UserViewSet.as_view(), name='users'),
] | [
"wdudek82@gmail.com"
] | wdudek82@gmail.com |
e6a2fb17e898a3dedb7ffb531fb3c9dcd46ee0a7 | 6189f34eff2831e3e727cd7c5e43bc5b591adffc | /WebMirror/management/rss_parser_funcs/feed_parse_extractRandnovelstlsamatchateaWordpressCom.py | d0cebc880f2171d48c773fdaf78dc3e6e389d55b | [
"BSD-3-Clause"
] | permissive | fake-name/ReadableWebProxy | 24603660b204a9e7965cfdd4a942ff62d7711e27 | ca2e086818433abc08c014dd06bfd22d4985ea2a | refs/heads/master | 2023-09-04T03:54:50.043051 | 2023-08-26T16:08:46 | 2023-08-26T16:08:46 | 39,611,770 | 207 | 20 | BSD-3-Clause | 2023-09-11T15:48:15 | 2015-07-24T04:30:43 | Python | UTF-8 | Python | false | false | 586 | py |
def extractRandnovelstlsamatchateaWordpressCom(item):
'''
Parser for 'randnovelstlsamatchatea.wordpress.com'
'''
vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title'])
if not (chp or vol) or "preview" in item['title'].lower():
return None
tagmap = [
('PRC', 'PRC', ... | [
"something@fake-url.com"
] | something@fake-url.com |
4aa8272025f036b52ea729420003ccaed04615fc | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02955/s157641213.py | 4c49cb084d398b88a82c7768e464c3400e1d3697 | [] | 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 | 693 | py | from collections import deque
def isok(x):
que=deque(sorted(z%x for z in a))
res=0
while que:
l=que[0]
if l==0:
que.popleft()
continue
r=que[-1]
if r==0:
que.pop()
continue
d=min(l,x-r)
que[0]-=d
que[-1]=... | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
25c76f936b1e618ae4f59f11a453aeb716d710ca | 4c0062f3b45afe6a087f0e8b0b9292448ce8680e | /inwike/wsgi.py | b62adb52993addcae9133236c57a9f24c5e90cd2 | [] | no_license | mitshel/inwike | 89846286824d4dd322edb4d51836af8d86da00d2 | e89bd4ccb9c3a71d17692d14def6e1041596d0f9 | refs/heads/master | 2020-06-20T21:04:00.623930 | 2019-07-19T20:14:03 | 2019-07-19T20:14:03 | 197,248,276 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 389 | py | """
WSGI config for inwike project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETTIN... | [
"mitshel@mail.ru"
] | mitshel@mail.ru |
daf4ddaea769085c50cf8f4f15f0287de9a5ab16 | 7256596fc6437c7f3cd1947f9f88bc556df6ba56 | /programs_in_python/programming_excercise/1.py | 7aa1303ea03548fa583c4aa0857c6f32292d692b | [] | no_license | panu2306/Python-Articles | fd02cf70635e4a63eae8b691597b6858c40832b8 | 7585dbdca92264a8f52cfb3c1b918b29814d3bd1 | refs/heads/master | 2020-12-27T17:33:28.576776 | 2020-05-06T14:55:10 | 2020-05-06T14:55:10 | 237,990,657 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 645 | py | '''
Write a program which will find all such numbers which are divisible by 7 but are not a multiple of 5,
between 2000 and 3200 (both included).
The numbers obtained should be printed in a comma-separated sequence on a single line.
'''
# Using List in Python:
def multiple_of_seven(start, end):
l = []
for i in ran... | [
"pranavbhendawade@gmail.com"
] | pranavbhendawade@gmail.com |
c7e086c6ea45c41cf28e897e3b175a4f462aca19 | ccf94dcb6b1500fcbbd56964ae8c4832a496b8b3 | /python/baiduads-sdk-auto/test/test_app_info_item.py | deaf0a9f6d02f3a631c0a04ff600f2afd04a818c | [
"Apache-2.0"
] | permissive | baidu/baiduads-sdk | 24c36b5cf3da9362ec5c8ecd417ff280421198ff | 176363de5e8a4e98aaca039e4300703c3964c1c7 | refs/heads/main | 2023-06-08T15:40:24.787863 | 2023-05-20T03:40:51 | 2023-05-20T03:40:51 | 446,718,177 | 16 | 11 | Apache-2.0 | 2023-06-02T05:19:40 | 2022-01-11T07:23:17 | Python | UTF-8 | Python | false | false | 637 | py | """
dev2 api schema
'dev2.baidu.com' api schema # noqa: E501
Generated by: https://openapi-generator.tech
"""
import sys
import unittest
import baiduads
from baiduads.appprocess.model.app_info_item import AppInfoItem
class TestAppInfoItem(unittest.TestCase):
"""AppInfoItem unit test stubs"""
de... | [
"jiangyuan04@baidu.com"
] | jiangyuan04@baidu.com |
5bd0e53ba54a4a57cf01aa9a0f830f42c969bd2f | e08e7bb643b81899d261bbdada63754eb32da2e8 | /demos/helloworld/jinja2-support/main.py | fff720215c30da226ea87bdea8861ee34f58e750 | [
"Apache-2.0"
] | permissive | tao12345666333/app-turbo | 95baa0e0d7f7172183591c2bc177efc9ae0e1b37 | 8717ba5631e47c476e277c3a897d85b5a93f9082 | refs/heads/master | 2020-12-25T04:45:26.575354 | 2016-12-11T15:35:12 | 2016-12-11T15:35:12 | 31,700,837 | 0 | 0 | null | 2015-03-05T07:14:08 | 2015-03-05T07:14:08 | null | UTF-8 | Python | false | false | 478 | py | #-*- coding:utf-8 -*-
from tornado.options import define, options
import tornado.options
import setting
import turbo.register
import turbo.app
#uncomment this to init state manager: store
#import store
turbo.register.register_app(setting.SERVER_NAME, setting.TURBO_APP_SETTING, setting.WEB_APPLICATION_SETTING, __fil... | [
"zhyq0826@gmail.com"
] | zhyq0826@gmail.com |
22731541dd107b93c3c9efbc5cf7a570dc5ca82e | a46d135ba8fd7bd40f0b7d7a96c72be446025719 | /packages/python/plotly/plotly/validators/pointcloud/hoverlabel/font/_color.py | ab79906bd35243f454c553b46a4a5012a256ba50 | [
"MIT"
] | permissive | hugovk/plotly.py | 5e763fe96f225d964c4fcd1dea79dbefa50b4692 | cfad7862594b35965c0e000813bd7805e8494a5b | refs/heads/master | 2022-05-10T12:17:38.797994 | 2021-12-21T03:49:19 | 2021-12-21T03:49:19 | 234,146,634 | 0 | 0 | MIT | 2020-01-15T18:33:43 | 2020-01-15T18:33:41 | null | UTF-8 | Python | false | false | 473 | py | import _plotly_utils.basevalidators
class ColorValidator(_plotly_utils.basevalidators.ColorValidator):
def __init__(
self, plotly_name="color", parent_name="pointcloud.hoverlabel.font", **kwargs
):
super(ColorValidator, self).__init__(
plotly_name=plotly_name,
parent_na... | [
"noreply@github.com"
] | hugovk.noreply@github.com |
b1e8dff10bd7f06b4f82282a4a65779bd9215537 | 781e2692049e87a4256320c76e82a19be257a05d | /all_data/exercism_data/python/hamming/ccca6c36f7464721986b3e6214962018.py | 73c19fda905d9bdfc0b57e3963e8c92516bc8d4d | [] | no_license | itsolutionscorp/AutoStyle-Clustering | 54bde86fe6dbad35b568b38cfcb14c5ffaab51b0 | be0e2f635a7558f56c61bc0b36c6146b01d1e6e6 | refs/heads/master | 2020-12-11T07:27:19.291038 | 2016-03-16T03:18:00 | 2016-03-16T03:18:42 | 59,454,921 | 4 | 0 | null | 2016-05-23T05:40:56 | 2016-05-23T05:40:56 | null | UTF-8 | Python | false | false | 239 | py | def distance(strand1, strand2):
if len(strand1) != len(strand2):
raise Exception('length mismatch', len(strand1), len(strand2))
hd = 0
for i in xrange(len(strand1)):
if strand1[i] != strand2[i]:
hd += 1
return hd
| [
"rrc@berkeley.edu"
] | rrc@berkeley.edu |
0ddbf86f3bedb7bcc299a23d41f190b92dc242af | bc2c2d63ac18dfa6b5171ff97ad6b88f647dc282 | /mininet/wifi/util.py | 00b9511e070c1f3f235e10d02d277a5b7d286e1e | [
"LicenseRef-scancode-x11-stanford"
] | permissive | MatthiasEckhart/mininet-wifi | ca8cadccb62db7ce6221ab0dcf4af7a79a93e74e | 95392e59f82e1380730b0b3f4e375a04839316ce | refs/heads/master | 2020-03-16T00:52:39.895729 | 2018-05-11T09:17:26 | 2018-05-11T09:17:26 | 132,427,457 | 1 | 2 | null | 2018-05-07T08:03:36 | 2018-05-07T08:03:36 | null | UTF-8 | Python | false | false | 1,014 | py | "Utility functions for Mininet-WiFi"
from mininet.util import retry
def moveIntfNoRetry(intf, dstNode, printError=False):
"""Move interface to node, without retrying.
intf: string, interface
dstNode: destination Node
printError: if true, print error"""
from mininet.wifi.node import Stat... | [
"ramonreisfontes@gmail.com"
] | ramonreisfontes@gmail.com |
094fb1998b4fb1a04b1860e17d4d7bcda5a15b28 | 9e988c0dfbea15cd23a3de860cb0c88c3dcdbd97 | /sdBs/AllRun/pg_0848+249/sdB_PG_0848+249_lc.py | 3419530c1b53949ad19342e48dd7c6716eb727b3 | [] | 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 | 346 | py | from gPhoton.gAperture import gAperture
def main():
gAperture(band="NUV", skypos=[132.907667,24.697419], stepsz=30., csvfile="/data2/fleming/GPHOTON_OUTPU/LIGHTCURVES/sdBs/sdB_PG_0848+249 /sdB_PG_0848+249_lc.csv", maxgap=1000., overwrite=True, radius=0.00555556, annulus=[0.005972227,0.0103888972], verbose=3)
if __name... | [
"thomas@boudreauxmail.com"
] | thomas@boudreauxmail.com |
4880c6673cf71e0c7ee5ecb34afce54a4736b043 | 48156b85839d832ecfe8fdf0a0e17b5ebf8b9460 | /75.findPeak.py | 1672766c60cae18647eadcca3b6c3ce2ede0c597 | [] | no_license | Aissen-Li/lintcode | 7dc2564fcec20667f073d9219fe049808c5de625 | 4d2a717956a75197ce1dfa1094cdd5ab3a1d2004 | refs/heads/master | 2020-11-28T16:43:21.760691 | 2020-01-14T15:08:45 | 2020-01-14T15:08:45 | 229,871,626 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 612 | py | class Solution:
"""
@param A: An integers array.
@return: return any of peek positions.
"""
def findPeak(self, A):
if A[1] > A[2]:
return 1
if A[len(A) - 2] > A[len(A) - 3]:
return len(A) - 2
start, end = 0, len(A) - 1
while start + 1 < end:
... | [
"aissen_f@163.com"
] | aissen_f@163.com |
81e8042a40de433fce29be36bc546150bd69ec66 | 87e60b0504be11c6997f1b20b72e9428cc128342 | /python/cowbells/data/tqplot.py | 5ca6659a29428f017baacabacc79523cfcbe6ff4 | [] | no_license | brettviren/cowbells | 70a85856fdfc54526c847f115d5dc01ec85ec215 | 1ceca86383f4f774d56c3f159658518242875bc6 | refs/heads/master | 2021-01-10T18:44:41.531525 | 2014-04-09T15:17:29 | 2014-04-09T15:17:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,644 | py | #!/usr/bin/env python
'''
Make some plots from the TQ tree.
'''
import ROOT
import math
def liberate(tobj):
ROOT.SetOwnership(tobj,0)
return tobj
def draw_stats(pad, h, fitnum =111):
h.Draw()
pad.Modified()
pad.Update()
stats = h.FindObject("stats")
if stats:
stats.SetOptStat(1110... | [
"bv@bnl.gov"
] | bv@bnl.gov |
cd7a6e39bddcd867989015fc0c40cc09c18bc796 | d86e9d59784097a7262fa9337585a36bd58a6d29 | /cvxbenchmarks/lib/data/epsilon/epopt/problems/hinge_l2.py | 41b8b42fd08be15cf32527c0526e7dc334f6548e | [] | no_license | nishi951/cvxbenchmarks | 2ae36e75c42c8bd35fafac98bad5d9d88168bd68 | 932141d8e4e929860011bf25c41e941e2f8fbd76 | refs/heads/master | 2021-01-11T07:23:32.260811 | 2018-09-15T22:23:14 | 2018-09-15T22:23:14 | 62,177,196 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 400 | py | """Standard SVM, i.e.. hinge loss w/ l2 regularization."""
from epopt.problems import problem_util
import cvxpy as cp
import epopt as ep
import numpy as np
import scipy.sparse as sp
def create(**kwargs):
A, b = problem_util.create_classification(**kwargs)
lam = 1
x = cp.Variable(A.shape[1])
f = ep.hi... | [
"nishimuramarky@yahoo.com"
] | nishimuramarky@yahoo.com |
87a1365fd6a9f6ccca02348485d3a70abebd022f | 34a26b713021f15d94d416b9728bac50d283ed5f | /interno_pymedigital-9.0/sale_order_invoice_amount/models/sale_order.py | 7dc71e3de0680f62a283f98ad86d6675e8ad4e35 | [] | no_license | Brahim820/odoo-1 | 7641b2a0ef411fb3b82f806a11e88b9880875a46 | d8ee18a7dc467ff250113a0a3df3fcf1e876b321 | refs/heads/master | 2020-04-07T10:58:09.517097 | 2018-11-19T16:56:45 | 2018-11-19T16:56:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,690 | py | # -*- encoding: utf-8 -*-
from openerp import api, fields, models, _
from openerp.tools import float_is_zero
from openerp.exceptions import UserError
class SaleOrder(models.Model):
_inherit = 'sale.order'
@api.multi
def action_invoice_create_from_amount(self, grouped=False, amount=0):
if amount ==... | [
"ceduardodch@gmail.com"
] | ceduardodch@gmail.com |
6436176ee36f61be4e18fceb8292042e2a8cd3bd | ccbb7fb8fda4d936e765263f05a435058b397bd9 | /src/guiltytargets/ppi_network_annotation/model/__init__.py | ab512ca4a78d001836dbb692256bd93d16deee04 | [
"MIT"
] | permissive | GuiltyTargets/guiltytargets | 5a5d3ba9e45867a64c81a91529ae6689f8be447f | c20a5cae6c9cc71c2ca73080a862abe986bc34c0 | refs/heads/master | 2022-02-13T03:30:49.705239 | 2021-12-22T12:51:20 | 2021-12-22T12:51:20 | 154,318,881 | 10 | 5 | null | null | null | null | UTF-8 | Python | false | false | 339 | py | # -*- coding: utf-8 -*-
"""Package that includes classes for data models."""
from .attribute_network import AttributeNetwork # noqa: F401
from .filtered_network import FilteredNetwork # noqa: F401
from .gene import Gene # noqa: F401
from .labeled_network import LabeledNetwork # noqa: F401
from .network import Net... | [
"cthoyt@gmail.com"
] | cthoyt@gmail.com |
3f7145a11f4c1d019d782a5fae6848a3d4d3f507 | 1d892928c70ee9ddf66f2a37a8e083d2632c6e38 | /nova/api/openstack/compute/contrib/rescue.py | 7bf815a37979d0e68811a4baac694cc8f191f500 | [
"Apache-2.0"
] | permissive | usc-isi/essex-baremetal-support | 74196c3f1332ee3cdeba9c263faff0ac0567d3cf | a77daf8ef56cf41e38de36621eda25ed3f180156 | refs/heads/master | 2021-05-19T03:12:11.929550 | 2020-07-24T14:15:26 | 2020-07-24T14:15:26 | 4,702,421 | 0 | 1 | Apache-2.0 | 2020-07-24T14:15:27 | 2012-06-18T15:19:41 | null | UTF-8 | Python | false | false | 3,310 | py | # Copyright 2011 OpenStack, 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 agreed... | [
"dkang@isi.edu"
] | dkang@isi.edu |
c7a1755f0e7fbc0d4edee7b813130bfb252193cf | 2acf64fca88200f4a4ada46f5da4f96702bafa06 | /stubs/facebook_business/adobjects/hotelroom.pyi | 0c74f95680b203626a30e5473345113f0c61cb3b | [] | no_license | vlab-research/adopt | bf6cdbfb751f7d85674e3925b207639e7d9d92c4 | 66347b00996e26910290e4fdb883e4231cc614af | refs/heads/master | 2023-04-12T12:16:23.061861 | 2021-05-18T14:17:01 | 2021-05-18T14:17:01 | 278,025,786 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,736 | pyi | from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject as AbstractCrudObject
from facebook_business.adobjects.abstractobject import AbstractObject as AbstractObject
from facebook_business.adobjects.objectparser import ObjectParser as ObjectParser
from facebook_business.api import FacebookRequest ... | [
"nandanmarkrao@gmail.com"
] | nandanmarkrao@gmail.com |
1bda6fd6e7271cebb0d5a3ec0f810bf5ba116d12 | 386d1b6557f4cbaf20794cd222f3b7b8598ef6a6 | /data/clean_data/A1/18.py | 165e341e4a20acdb7adcf06e11bc7e769b947482 | [] | no_license | woowei0102/code2pro | 3baf86985f911264362963c503f12d20bdc1f89f | 0b16c62a1cb9053ab59edd7a52e1b3b39fdf66dc | refs/heads/main | 2023-06-28T23:09:23.998798 | 2021-07-13T11:49:27 | 2021-07-13T11:49:27 | 385,585,282 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 710 | py | class Account:
def __init__(self, name):
self.name = name
self._balance = 0
def deposit(self, amount):
self._balance = self._balance + amount
print('{}存了NT${:,.0f}元.'.format(self.name,self._balance))
def withdraw(self, amount):
if amount < self._balance:
se... | [
"54971984+woowei0102@users.noreply.github.com"
] | 54971984+woowei0102@users.noreply.github.com |
d6de7da64fe8278c4dcc7e25bc1fdf741e82efa8 | d7e9bf5d59343f9ea1670fc529e1afa8fdcbf337 | /Section-04/create_tables.py | 2cd9ed6868b3e5aafebbbf768358599456b3f6fa | [] | no_license | tyday/solid-guacamole | 2610985f3156d44144cf40dd65b040898fb8c159 | f1a1544ae831c18c2acf558afdf8a1d4c9991152 | refs/heads/master | 2020-05-05T09:01:56.946260 | 2019-04-14T17:49:13 | 2019-04-14T17:50:21 | 179,888,284 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 424 | py | import sqlite3
connection = sqlite3.connect('data.db')
cursor = connection.cursor()
create_table = "CREATE TABLE IF NOT EXISTS users (id INTEGER PRIMARY KEY, username text, password text)"
cursor.execute(create_table)
create_table = "CREATE TABLE IF NOT EXISTS items (name text, price real)"
cursor.execute(create_tab... | [
"tyrday@gmail.com"
] | tyrday@gmail.com |
caa8266f63e9454a80ff08be34a5a07f072d0f01 | 98a359465e6e0620accede5b87b819aed663179d | /schol_library/migrations/0059_auto_20190922_1729.py | f4818e0050c290afbb640c3b9136a5ea6ce4a2ed | [] | no_license | mustavfaa/back-end | 88f8674bd6c2f8d0c4984a2a3d34f2aece3ec8d1 | 6635e8f504c7a7ba9709121b4dd8d5ccecdf05ca | refs/heads/main | 2023-08-15T10:48:03.461138 | 2021-09-27T15:26:03 | 2021-09-27T15:26:03 | 410,938,832 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,011 | py | # Generated by Django 2.2 on 2019-09-22 11:29
import datetime
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('schol_library', '0058_auto_20190922_1144'),
]
operations = [
migrations.AddField(
model_name='requestedition',
... | [
"72229762+mustavfaa@users.noreply.github.com"
] | 72229762+mustavfaa@users.noreply.github.com |
eb129243a035487b54c5721c6288ed1cc40cdb22 | 96a34a048c783a75736bf0ec775df22142f9ee53 | /packages/models-library/src/models_library/services_access.py | 9e121fad95a0a38e9c550ccca50cfff86227dfc2 | [
"MIT"
] | permissive | ITISFoundation/osparc-simcore | 77e5b9f7eb549c907f6ba2abb14862154cc7bb66 | f4c57ffc7b494ac06a2692cb5539d3acfd3d1d63 | refs/heads/master | 2023-08-31T17:39:48.466163 | 2023-08-31T15:03:56 | 2023-08-31T15:03:56 | 118,596,920 | 39 | 29 | MIT | 2023-09-14T20:23:09 | 2018-01-23T10:48:05 | Python | UTF-8 | Python | false | false | 666 | py | """Service access rights models
"""
from pydantic import BaseModel, Field
from pydantic.types import PositiveInt
GroupId = PositiveInt
class ServiceGroupAccessRights(BaseModel):
execute_access: bool = Field(
default=False,
description="defines whether the group can execute the service",
)
... | [
"noreply@github.com"
] | ITISFoundation.noreply@github.com |
5431703d1c4fa12874ad6fb9cb4a6c792be79bb7 | 0809ea2739d901b095d896e01baa9672f3138825 | /ORMproject1/testApp/migrations/0002_proxyemployee_proxyemployee2.py | 947459ac9771a7ef22b74ac0159c4d06da01f56a | [] | no_license | Gagangithub1988/djangoprojects | dd001f2184e78be2fb269dbfdc8e3be1dd71ce43 | ea236f0e4172fbf0f71a99aed05ed7c7b38018e2 | refs/heads/master | 2022-11-15T23:46:46.134247 | 2020-07-15T06:37:51 | 2020-07-15T06:37:51 | 273,479,403 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 791 | py | # Generated by Django 3.0.5 on 2020-04-30 05:40
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('testApp', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='ProxyEmployee',
fields=[
],
... | [
"djangopython1988@gmail.com"
] | djangopython1988@gmail.com |
f3f75af6d875f307aaf0c5dd59ebde978c2efb5d | 19101bf9478c585f73540f1962494a0315ccd0a6 | /ax/models/tests/test_alebo_initializer.py | 8c37f09dce95a0e81f510189ed5551873bcd1268 | [
"MIT"
] | permissive | liusulin/Ax | 4ca1dcaa34f129d25faa2f52a8094b5f6e399eba | 850b6975b7c7f9960ad5461e71d0304b2670232a | refs/heads/main | 2023-07-14T01:02:38.044397 | 2021-08-18T15:34:06 | 2021-08-18T15:35:11 | 397,664,102 | 1 | 0 | MIT | 2021-08-18T16:16:10 | 2021-08-18T16:16:09 | null | UTF-8 | Python | false | false | 1,047 | py | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import numpy as np
from ax.models.random.alebo_initializer import ALEBOInitializer
from ax.utils.common.testutils impor... | [
"facebook-github-bot@users.noreply.github.com"
] | facebook-github-bot@users.noreply.github.com |
66f2df3cf8c49c743f988bcbdddae4207bad389c | c0c8aeb5aaf08925d8c9e1d660b02c89cbc7ad71 | /Algorithms/Medium/105. Construct Binary Tree from Preorder and Inorder Traversal/answer.py | bec4709a6dc30054d5688961993bb42736c611cf | [
"Apache-2.0"
] | permissive | kenwoov/PlayLeetCode | b2fdc43d799c37683a9efdc31c4df159cf553bf5 | 4012a2f0a099a502df1e5df2e39faa75fe6463e8 | refs/heads/master | 2022-12-17T05:54:22.775972 | 2020-09-26T14:08:43 | 2020-09-26T14:08:43 | 214,839,611 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 653 | py | from typing import List
class TreeNode:
def __init__(self, x):
self.val = x
self.left = None
self.right = None
class Solution:
def buildTree(self, preorder: List[int], inorder: List[int]) -> TreeNode:
if not preorder:
return None
root = TreeNode(preorder[0... | [
"kenwoov@outlook.com"
] | kenwoov@outlook.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.