Skip to content

Instantly share code, notes, and snippets.

View jy00295005's full-sized avatar

陈挺 jy00295005

  • 中国科学院科技战略咨询研究院
  • Beijing China
View GitHub Profile
@jy00295005
jy00295005 / strategy_oauth.php
Created June 9, 2013 14:18
a oauth client based on codeigniter PHP
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* strategy_sauth.php
*
* A Oauth client
*
* @author Chen Ting
* @copyright free to use
* @link
@jy00295005
jy00295005 / my_google_map_heler.js
Last active April 15, 2016 01:37
create google map for my project
// need two files
// <script language="JAVASCRIPT" src="../js/infobox.js"></script>
// <script language="JAVASCRIPT" src="../js/markerwithlabel.js"></script>
var helper = {};
//map style array
var style_pale = [{"featureType":"water","stylers":[{"visibility":"on"},{"color":"#acbcc9"}]},{"featureType":"landscape","stylers":[{"color":"#f2e5d4"}]},{"featureType":"road.highway","elementType":"geometry","stylers":[{"color":"#c5c6c6"}]},{"featureType":"road.arterial","elementType":"geometry","stylers":[{"color":"#e4d7c6"}]},{"featureType":"road.local","elementType":"geometry","stylers":[{"color":"#fbfaf7"}]},{"featureType":"poi.park","elementType":"geometry","stylers":[{"color":"#c5dac6"}]},{"featureType":"administrative","stylers":[{"visibility":"on"},{"lightness":33}]},{"featureType":"road"},{"featureType":"poi.park","elementType":"labels","stylers":[{"visibility":"on"},{"lightness":20}]},{},{"featureType":"road","stylers":[{"lightness":20}]}];
//helper中map会需要的函数放在此处
helper.map = {
@jy00295005
jy00295005 / get_truth_ground.py
Last active August 29, 2015 14:04
use three search keywords in nuclear physics to search in solr index, get 3 sets of data as our clustering's truth ground
import requests
from pony.orm import *
##define the mysql database and the table Truth with pony
db = Database('mysql', host='localhost', user='root', passwd='xxxxxxxxx', db='clustering')
# sql_debug(True)
db.generate_mapping(create_tables=True)
class Truth(db.Entity):
id = PrimaryKey(int, auto=True)
systemid = Required(LongStr)
25.2477 -0.194538 -0.552645
21.7033 10.1981 3.57863
-8.08058 -9.11697 16.8763
-2.98232 4.97595 -3.94315
8.18058 5.40521 -3.5874
-1.13182 12.7035 -6.84357
17.9646 -2.50859 17.8816
16.3692 -5.73313 -3.59136
17.5019 -7.36846 -3.49826
11.7671 15.5554 -1.90575
{
"embeddings": [
{
"tensorName": "ESI_RA_MAP",
"tensorShape": [
18731,
3
],
"tensorPath": "https://gist.githubusercontent.com/jy00295005/06c9b50d00c43465fef81033e768edff/raw/258d3c4d8d523024a6a46b95796b9f6c16412bfb/ESI_RA_xyz_3d.tsv",
"metadataPath": "https://gist.githubusercontent.com/jy00295005/431ab590fe5bfac7cc864c558a0bc905/raw/a26acb47ea028d222154f6542b29275b168bfd7a/ESI_RA_meta_noabs_3d.tsv"
We can't make this file beautiful and searchable because it's too large.
NSF_id,Title,abstract,KMEANS_LABEL,organization
1020001000389662,EAGER: Using Crowdsourced Virtual Students to Create Intelligent Tutors,"This project will develop and evaluate the potential of a new human-computer system that bridges the roles of virtual student and virtual teacher to allow humans and computers to take turns teaching and learning from each other. The key insight is that reading comprehension activities (e.g., vocabulary building, summarizing, question generation, concept mapping) closely parallel the knowledge engineering required to create virtual teachers for intelligent tutoring systems (ITSs). The system links these activities so that when students read online, they engage a virtual student in educational tasks that both improve their reading comprehension and simultaneously contribute to the creation of ITSs for future students. An important aspect of the proposed research is to find the optimum balance between student learning (which benefits the individual) and the creation of ITS kno
We can't make this file beautiful and searchable because it's too large.
id title country country_index start_year year_range scope document_type economic_sector energy_types energy_types_index summary
2 Energy Industry Act, BE 2550 (2007) THAILAND 17 2007 2000-2010 National Act Multi-Sector All 11 Umbrella policy defining the general provisions, regulatory body, industry operation, consumer protection, utilization of immovable property, redress of disputes and lodging of appeals, competent officials, disciplinary procedures, punishment, and transitional provisions of the energy industry of Thailand.
3 Thai ESCO Association Registration Guidelines THAILAND 17 2003 2000-2010 National Guideline Multi-Sector All 11 Procedural guidelines on registration of ESCOs
4 Energy Conservation Promotion Act. (No.2), BE 2550 (2007) THAILAND 17 2007 2000-2010 National Act Multi-Sector Other 6 "Amendment of the Energy Conservation Act BE 2535 (1992). Addresses energy conservation in factories, buildings, machinery, equipment and promotion of energy-efficient materials. Confirms the power of Minist
{
"embeddings": [
{
"tensorName": "energy policy",
"tensorShape": [
2928,
3
],
"tensorPath": "https://gist.githubusercontent.com/jy00295005/07abb351b24b381dd9d20aa56ff2d118/raw/f07816e1cf99fb2658e7f70e1bccf3ff31d051eb/energy_polices_xyz_2.tsv",
"metadataPath": "https://gist.githubusercontent.com/jy00295005/07abb351b24b381dd9d20aa56ff2d118/raw/f07816e1cf99fb2658e7f70e1bccf3ff31d051eb/energy_polices_meta.tsv"
We can't make this file beautiful and searchable because it's too large.
ID,任务,发布中心,年,基金编号,标题,摘要
658,Science,JPL,2017,S2.01-9655 ,Next-Generation Deformable Mirrors for Astronomical Coronagraphy by Utilizing PMN-PT Single Crystal Stack Actuators in integration with Driver ASIC,"This SBIR Phase I project aims to develop a new manufacturing approach for deformable mirrors (DMs) by batch fabricating the stack actuator array. The innovation leverages on our experience in developing stack actuator DM system with integrated ASIC driver electronics, enabling the next-generation DM-ASIC systems that are featured with: electro-mechanical performance exceeding traditional piezoelectric DMs by about 5 times, reduced number of wires from thousands to several tens, reduction of the power dissipation by two (2) orders of magnitude, shrinking of the form factor (weight/size) of the DM driver electronics by up to two (2) orders of magnitude, and reducing the DM cost by about 5 times. With both DM and the driver ASIC scalable by mosaicking to 96x96, 128x128 or larger format, the innovation holds p